webpack-contrib / file-loader

File Loader
MIT License
1.86k stars 257 forks source link

Add a flag to enable ES module syntax #338

Closed joseprio closed 4 years ago

joseprio commented 5 years ago

Feature Proposal

At the moment the generated JS module uses the commonJS syntax. It would be useful to have an option that would use the ES module syntax instead.

Feature Use Case

Old commonJS syntax prevents module concatenation in Webpack. It may help tree shaking in some cases too.

joseprio commented 5 years ago

Happy to create a pull request if needed.

alexander-akait commented 5 years ago

PR welcome

alexander-akait commented 4 years ago

Done in master, release will be soon