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

support loaders implemented in ESM #14077

Closed
wants to merge 1 commit into from
Closed

Conversation

jablko
Copy link

@jablko jablko commented Aug 27, 2021

Passing type: "module" to loader-runner will load all loaders with import() vs. require(): https://github.com/webpack/loader-runner/blob/6221befd031563e130f59d171e732950ee4402c6/lib/loadLoader.js#L5-L9

import() supports both ESM and CJS whereas require() was CJS only.

Fixes #13233

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@webpack-bot
Copy link
Contributor

@jablko The most important CI builds failed. This way your PR can't be merged.

Please take a look at the CI results from azure (1 errors / 2 warnings) and appveyor (failure) and fix these issues.

@jablko jablko mentioned this pull request Aug 28, 2021
@vankop
Copy link
Member

vankop commented Feb 14, 2022

duplicate of #15198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ECMAScript loader (with "type": "module")
3 participants