Bug
What is the current behavior?
In case of development environment such code
if (process.env.NODE_ENV === 'testing') {
import('somemodule');
}
is transformed by webpack 2.5.1 into this
if (false) {
import('somemodule');
}
which leads to Uncaught SyntaxError: Unexpected token import error in the latest Chrome.
Node.JS 7.10.0, babel 6.24.1 has syntax-dynamic-import plugin
Bug
What is the current behavior?
In case of development environment such code
is transformed by webpack
2.5.1into thiswhich leads to
Uncaught SyntaxError: Unexpected token importerror in the latest Chrome.Node.JS 7.10.0, babel 6.24.1 has
syntax-dynamic-importplugin