Migrate V1.0 to webpack 3
jvanbruegge opened this issue ยท 9 comments
Webpack 3 was just released: https://github.com/webpack/webpack/releases/tag/v3.0.0
Only a few internal breaking changes so some plugins might be affected.
The big plus is scope hoisting like Rollup which increases initial paint and reduces bundle size
Would be nice to try
I already left a reply in another issue, stating that we should make webpack
itself a peer dependency (is a dependency right now).
But a separate issue is a good idea :)
The problem is that plugins may break, so if we have a block that is not compatible with V3 we have to make it a depenency. I would not support two version at the same time
The thing here is: If we keep webpack
as direct dependency
then the user cannot control which version of webpack they are using.
Making it a peerDependency
seems much more natural to me, since then you still have the information with which webpack versions this version of webpack-blocks is compatible, but you can define which webpack version you want to use for your project.
I don't want webpack-blocks to hide away webpack completely, because it is too important to the project. Maybe you are using webpack v2.4 and want to update to v2.5, but there is still an issue with a plugin in v2.5. So you have to wait until the issue gets fixed. You as the developer working on that project want to be able to say when it's time to switch from webpack 2.4 to 2.5.
peerDependency is clearly the way to go because webpack-block is a sibling to wepack rather than a real dependency
What I mean by a sibling is you are using webpack AND wepackblock on your own project.
Let the user choose his own version of webpack
Yup, webpack-blocks is a tool to help you configure webpack, so it would be natural to use peerDependencies.
Fixed now
Would be nice to update the readme here also so people know its useable also for webpack3