-
Notifications
You must be signed in to change notification settings - Fork 38
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
anticipated changes needed for webpack v4 support? #9
Comments
Hey @thescientist13, sorry for the late reply. Have you made any progress on upgrading to v4? |
Hey @anthonygore ! I am still getting there piece by piece here but now that #10 has been merged (thank you!), I can just try updating webpack here in this repo and see if all the tests still pass. ✅ |
it's extract-text-webpack-plugin's issue |
It appears that for webpack v4 extract-text-webpack-plugin is dead and mini-css-extract-plugin is the paved road approach. |
@lili21 / @bfkeinberg @anthonygore I am going to test out mini-css-extract-plugin now in my side project and see it how it goes, mainly to make sure bundle sizes are comparable to that of extract-text-webpack-plugin. Will report back. |
Seems to be working well for me with mini-css-extract-plugin based on my work in my project using webpack v4. (ProvidenceGeeks/website-frontend#142). |
Yeah, I think you're right about mini-css-extract-plugin being the future. However, I think we proceed with extract-text-webpack-plugin for now, though, and wait and see where the dust settles. Do you agree? |
@anthonygore these comments seem to suggest ETWP will not be making the full jump to webpackv4 support. My understanding is that mini-css-extract-plugin is the (official webpack team supported) way to go forward. |
So I think the issue may be related to Chrome Headless dependency. Switched the CircleCI build to use my personal Docker image that has Chrome Headless installed on my fork PR and now the build is passing Maybe the dependency is coming from JSDOM? Let me see if I can dig further into where that dependency is coming from since I think it would ideal if we could get by without it due to the complex nature of setting up environments (local, CI, etc) to support it. edit: seems to be coming from critical itself $ npm ls puppeteer
[email protected] /Users/owenbuckley/Workspace/github/forks/html-critical-webpack-plugin
└─┬ [email protected]
└─┬ [email protected]
└── [email protected] I guess the assumption being that if you want to run critical, you need to be on a host environment that expects chromium support? This seems inline with my experiences using Chrome Headless in the context of Karma unit testing. |
Interesting. Any ideas as to why this issue only happens when testing? |
not sure @anthonygore , but I will do some more testing today on this and hopefully get a straight answer as to what's the issue. |
FWIW I see similar output in my project too (node:839) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(node:839) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead
(node:839) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!
/home/circleci/repo/node_modules/puppeteer/.local-chromium/linux-508693/chrome-linux/chrome: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
(node:839) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. In this case, the build is not exiting too, which is similar to the behavior we're seeing here and so has probably been doing so for all my PRs. So basically using critical as of version 1.0.0 is dependent on runtime environment that has support for Headless Chrome, and more to the point, the OS specific libraries needed to run it. When this package was bumped to that version, my guess is that is when things started silently breaking for people 😞 And so in my PR above, it included a bump to this latest version of html-critical-webpack-plugin. So next steps I see are basically around documentation / maintenance / tracking:
Thoughts? |
@thescientist13 was the PR meant for this repo? I think you've made it on your own repo 😃 |
@anthonygore This aimed to make the case per my recommendation here to setup CI for this repo as a perquisite to any more (feature) work in general. |
I'm in the process of upgrading to
[email protected]
and while working through issues withExtractTexxtWebpackPlugn
which I think is why I am seeing this error in my PR hereand so just wanted to start the discussion to see if any of the breaking changes for plugins in v4 would apply here?
https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202
Maybe the removal of
this.options
? If help is needed, I can try and take a shot at it. Thanks for this great plugin! 🙏 ✌️The text was updated successfully, but these errors were encountered: