aurelia / loader-webpack

An implementation of Aurelia's loader interface to enable webpack.
MIT License
26 stars 10 forks source link

Can't use es2015 or native-modules with webpack #31

Closed jods4 closed 7 years ago

jods4 commented 7 years ago

Webpack throws an error when it sees a free variable module used in an ES module (i.e. in the same file as import or export).

module is found in lots of places because of module.hot.

The consequence is that neither es2015 nor native-modules are usable with Webpack currently. This is important because ES modules is a prerequisite for tree shaking.

To me this seems like a bug in webpack, or maybe they changed the API for HMR when using ES modules. I'll investigate.

jods4 commented 7 years ago

This was indeed a bug in webpack as module.hot is supposed to work. It was fixed by the 2.2 RC5 release.