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.
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 ofmodule.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.