New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update webpack to 4.0.0 #41
Conversation
There are some issues with |
chunks: 'all' | ||
}, | ||
runtimeChunk: true | ||
}, | ||
plugins: [ | ||
new WebpackCleanupPlugin(), | ||
new webpack.optimize.ModuleConcatenationPlugin(), | ||
new webpack.DefinePlugin({ | ||
'process.env': env, | ||
}), | ||
new webpack.NamedChunksPlugin(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is automatically on in development
mode, so can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah wait, this is prod, maybe we want to leave it on here :) (but can be removed from dev config)
NamedModulesPlugin -> optimization.namedModules (on by default in develoment mode)
|
Not sure if we want this, but:
So we could add |
So we can remove this one as well |
Remove lib config from tsconfig.json for now because it is still has issues in awesome-typescript-loader
I implemented the suggestions by @ThaNarie above. |
Revert the change to tsconfig.json. It is no longer needed because the underlying issue has been fixed in awesome-typescript-loader
@hjeti I fixed the TS issues (see latest commit). As far as I know this can be safely merged. It might be good though for someone to test these changes more extensively (for example, apply them in an existing project) |
Just tested it by applying the changes to an existing project. All worked fine (tested dev server and prod build). |
I updated everything to make the build and dev commands work without error. However, we should thoroughly review the new configuration before merging. Particularly:
CommonsChunkPlugin
has been replaced with theoptimization
config. I am now using the default configuration for that. We should verify if that is what we want. See https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693extract-text-webpack-plugin
. We might want to wait for stable