Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Migrate to webpack 4 #93
So I've had a busy day porting the plugin to webpack 4. I think we're pretty much there now. Yay!
All the tests are passing apart from 2 Vue integration tests:
The reason these are failing is that there are extra errors surfacing when these tests are run:
My feeling is that this is probably because vue-loader has yet to be ported to webpack 4. On that basis I'd ignore these failing tests for now.
If there's any Vue peeps out there that could advise on vue-loader supporting webpack 4 that'd be awesome.
It looks like the vue-loader needs work to be webpack 4 compatible. See here: vuejs/vue-loader#1142
Since I can't publish
PS @piotr-oles if you could requeue Travis that'd be helpful; it had a moment and didn't actually start running the tests. Thanks!
I've merged in the changes.
Here's where we are:
I've bumped to version number of the package to
I've pushed out a new beta here: https://github.com/johnnyreilly/fork-ts-checker-webpack-plugin/tree/4.0.0-beta.1
We should: - be sure that it will be backward compatible - or remove incompatible webpack's versions in peer dependency. In my opinion it's too early to drop webpack 2 and 3 support. Also, maintaining two versions of plugin will be bad. My proposition is to run integration tests with webpack 2, 3 and 4. 04.02.2018 10:45 AM "John Reilly" <firstname.lastname@example.org> napisał(a):…
Hey @piotr-oles <https://github.com/piotr-oles>, I've merged in the changes. Here's where we are: - non Vue tests pass as they did before - Vue tests pass! I've migrated the plugin to use version 14.1.0 of vue-loader - this should support webpack 4 according to @yyx990803 <https://github.com/yyx990803> here <vuejs/vue-loader#1142 (comment)> It's not clear how backwards compatible the webpack 4 changes are. To quote @sokra <https://github.com/sokra> here <https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202>: "The plugin method on tapable objects is theoretically backward-compatible" I've bumped to version number of the package to 0.4.0 as that seems reasonable. What do you think? cc @prograhammer <https://github.com/prograhammer> @CKGrafico <https://github.com/ckgrafico> @wonderful-panda <https://github.com/wonderful-panda> — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#93 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AH_IyUV-Fn42MAMJYoTyqW3SrarEbFX-ks5tRXxVgaJpZM4Rvdtb> .
I've added in a script that runs integration tests against webpack 2, 3 and 4. As you can see, the tests fail with webpack 2 and 3. I don't think we can rely on the changes required for webpack 4 being backwards compatible.
That being the case, how do you want to proceed? In case it helps, here's what I'm planning for
So what would you like me to do? Shall I remove webpack 2 and 3 from the
Maintaining 2 versions of the plugin would be rubbish. But theoretically, further releases of the plugin for webpack 2/3 will hopefully not be necessary. As long as there's something in the
What do you think?
I think the approach in place works. The builds are failing on webpack 2 and 3 because config has to be slightly different for webpack 2 and 3 than it does for 4.
I think I need to amend the integration tests to check the version of webpack being used and only supply the
Not sure the best way to achieve that but I'll have a think. Suggestions welcome!
Okay - this has not gone as well as I'd hoped. I'm now conditionally providing different webpack configs depending on the webpack version.
As expected, webpack 4 tests still all pass.
With webpack 2/3 there's 1 integration test failure (which may not be a true failure) in the standard (
More problematically; the Vue tests are failing in the webpack 2 / 3 branch. I've tried rolling back to the older (13.5) version of vue-loader but that seems to make no difference. I don't know much about Vue and I'm not likely to get much further with that.
FWIW, I suspect the plugin works with webpack 2/3 just fine. However, persuading the integration tests to agree is where the trouble likely lies. I'm just not sure as to why.
If no-one's is able to help out with the Vue issues I'm likely to suggest we drop support for webpack 2 / 3 in the same codebase. The added complexity isn't getting us to a good place so far.
Until it is merged and released, you can try the beta. Details here: https://blog.johnnyreilly.com/2018/01/webpack-4-ts-loader-fork-ts-checker.html
referenced this pull request
Feb 20, 2018
added a commit
this pull request
Feb 20, 2018
I've published this to https://github.com/typestrong/fork-ts-checker-webpack-plugin (what we're using as an
See the readme.md for details on how to use it in your
webpack 4 has now shipped!
I've released ts-loader 4.0 and I've published this to https://github.com/typestrong/fork-ts-checker-webpack-plugin - early adopters can use this until @piotr-oles has chance to merge and publish.
See blog post for more details: https://blog.johnnyreilly.com/2018/02/ts-loader-400-fork-ts-checker-webpack.html