Skip to content

Webpacker 6 and babel.config.js #2845

Closed
@n-rodriguez

Description

@n-rodriguez

I have a babel.config.js in the root of my project and it was perfectly loaded with Webpacker 5.

With Webpacker 6 the babel.config.js file is not loaded anymore. Instead it seems to load this file (https://github.com/rails/webpacker/blob/master/package/babel/preset.js).

How can I override this and load my own babel.config.js file?

I've changed the babel config in package.json :

  "babel": {
    "presets": [
      "./babel.config.js"
    ]
  },

but it doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions