.mjs support

Do you want to request a feature or report a bug?
Feature request

What is the current behavior?
Can’t import .mjs files without extra configuration.

What is the expected behavior?
.jsm nodules are supported ‘out of the box’ also some changes to the module parsing/resolution apply:

  • require, define and module.exports are ignored and passed through unchanged.
  • can only import cjs exports as esm default export
  • can only import using the file file extension. (All imports must be URLs)

If this is a feature request, what is motivation or use case for changing the behavior?
Comparability with nodejs
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

Author: Fantashit

1 thought on “.mjs support

Comments are closed.