Export "Webpack 2" not defined "

I just upgraded to Webpack 2 and I get the exports is not defined runtime error in my browser. I modified my .babelrc as follows:

 { "plugins": [ "syntax-flow", "transform-flow-strip-types", "add-module-exports" ], "presets": [ "latest", "stage-2" ] } 

:

 { "plugins": [ "syntax-flow", "transform-flow-strip-types", "add-module-exports" ], "presets": [ ["latest", { "es2015": { "modules": false } }], "stage-2" ] } 

Deactivate translation and import of broadcast and import webpack 2. Am I missing something? The string compiles correctly, but it just explodes in the browser.

+5
source share
1 answer

TL DR) Get rid of the add-export module

To learn more about what is happening: https://ntucker.true.io/ntucker/webpack-2-uncaught-referenceerror-exports-is-not-defined/

+6
source

Source: https://habr.com/ru/post/1263818/


All Articles