babel-plugin-add-module-exports generates an incorrect bundle if you use ES modules in the latest versions of Webpack 2 (at least in 2.1.0-beta.27 and .28). Here’s what to do.
{
"plugins": [
- "add-module-exports"
]
}babel-plugin-add-module-exports generates an incorrect bundle if you use ES modules in the latest versions of Webpack 2 (at least in 2.1.0-beta.27 and .28). Here’s what to do.
{
"plugins": [
- "add-module-exports"
]
}| // my-app/webpack.config.js | |
| { | |
| externals: { | |
| 'jquery': 'jQuery', | |
| /* ↑ With this line, Webpack will replace every | |
| * import $ from 'jquery'; | |
| * | |
| * in your code with approximately | |
| * const $ = window.jQuery; | |
| * |