Skip to content

support loaders implemented in ESM#14077

Closed
jablko wants to merge 1 commit intowebpack:mainfrom
jablko:patch-1
Closed

support loaders implemented in ESM#14077
jablko wants to merge 1 commit intowebpack:mainfrom
jablko:patch-1

Conversation

@jablko
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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