Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of Webpack's babel loader options #796

Merged
merged 2 commits into from
May 4, 2021

Conversation

charlespierce
Copy link
Contributor

Info

  • In a similar vein to Allow thread-loader configuration #795, it can be useful for an app to be able to override the additional options provided by babel-loader. Note: The app already controls the babel config itself, this is only looking at the loader-specific options.
  • One specific use-case is turning off the persistent cache, which can improve build performance in some projects.

Changes

  • Added babelLoaderOptions to the webpack package's Options object, with a specification of which options are available.
    • I couldn't find any existing type definitions, so I copied the options from the documentation (happy to update it to use object instead if we'd prefer to avoid having to maintain the types).
  • Included the extra options in the babelLoaderOptions function to make sure that they override anything provided by Embroider.

@ef4 ef4 merged commit ea6f2dd into embroider-build:master May 4, 2021
@rwjblue rwjblue added the enhancement New feature or request label May 4, 2021
@charlespierce charlespierce deleted the babel_loader_options branch May 4, 2021 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants