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

Feature/configurable es modules #97

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kuddl
Copy link

@kuddl kuddl commented Aug 10, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: link tbd.
  • Tests for the changes have been added (for bug fixes / features) -> need to add more tests!
  • Docs have been added / updated (for bug fixes / features)

PR Type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] tooling / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Right now, there is no option to configure the type of import ESModules or CommonJS.
Since file-loader 5.0 the default is set to "ESModules".
Therefore we needed a way to configure it back to CommonJS.

https://github.com/webpack-contrib/file-loader/releases/tag/v5.0.0

What is the new behavior?

You can configure, if you want to use CommonJS (default) or ESModules (with option set to true)

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Maybe we could write more test for this behaviour.
Right now, the tests, only check, if the option is set correctly

https://github.com/webpack-contrib/file-loader/releases/tag/v5.0.0

Tobias Sailer added 2 commits August 13, 2021 15:42
…t default module to CommonJS

Update of file-loader and url-loader introduced the default module import is set to ES module, we
set the config back to commonJS
…nfiguration to enable ESModules

Add a option to make the switch between CommonJS and ES module type imports
@kuddl kuddl force-pushed the feature/ConfigurableESModules branch from 352e3da to 98a9647 Compare August 13, 2021 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant