__Feature to document__
https://webpack.js.org/loaders/file-loader/#esmodule
__Author(s)__
-
__Additional information__
As said in the feature description:
By default, file-loader generates JS modules that use the ES modules syntax.
I don't get what that means, does the file-loader generates a javascript module? Am I shipping a module in the browser? Or it generates a modules that is later webpack bundles?
[x] I am willing to work on this issue and submit a pull request.
webpack support import and require statements, using import allow to concatenate modules (less modules and runtime).
esModule:
false => module.export = "path/to/file.ext";true => export default "path/to/file.ext";The example cleared it up! I will make a PR and update the docs with it
Nevermind it's on the README of file-loader
Most helpful comment
webpack support
importandrequirestatements, usingimportallow to concatenate modules (less modules and runtime).esModule:
false=>module.export = "path/to/file.ext";true=>export default "path/to/file.ext";