Closed marvinhagemeister closed 7 years ago
webpack-dev-server has a bug https://github.com/webpack/webpack-dev-server/issues/984
Oh wow, I found the issue. It was a simple misconfiguration on my part. To inject globals I used the ProvidePlugin
and not DefinePlugin
. The former is used to replace modules and the latter simply defines a global variable.
Sorry for the confusion!
plugins: [
new webpack.DefinePlugin({ // was using `ProvidePlugin` instead :/
__IVI_DEV__: true,
__IVI_BROWSER__: true,
}),
],
Ah, sorry, forgot that I've changed to DefinePlugin
when I've tried to find a problem. Just tried different things and the last problem was with missing loglevel
package, I though that it was the main problem.
I'm having trouble bundling ivi with wepback and the stack trace isn't that meaningful. This even happens with a simple app like this:
Stacktrace:
I'm a bit confused as to what is actually happening here. Webpack seems to stumble on the
render
import. A repo to easily reproduce the bug is here: https://github.com/marvinhagemeister/ivi-webpack-problem