-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
webpackVersion
check doesn't work if multiple versions of webpack are in use
#600
Comments
Maybe we can duck typing |
Anyway it should not happen, because other plugins use the same logic, something wrong with your env/setup |
Found, update webpack to latest rc, |
I am also facing this issue with |
@marcelgerber Please create reproducible test repo, terser should failed too here |
Hi @evilebottnawi, I've set up a demo project at https://github.com/MarcelGerber/webpack-demo. In it, |
Thanks I will look at this tomorrow |
For this to work plugin must avoid to import "webpack" at all. For that we maybe need to expose |
Yep, I think so too. |
@evilebottnawi Also, ran into this issue. Could you please suggest a workaround for it? |
Disable hoist for webpack |
Give me 10-15 minutes, I will try to fix it, should be easy |
@evilebottnawi Thanks for quick action. I tested it just now, issue still persists. The webpack version printed 5.2.0 during debug, since there is no support for webpack 5 in storybook, this needs to be handled by their webpack configuration somehow. follow up: storybookjs/storybook#11326 |
@shobhitsharma Can you create reproducible test repo? |
Sadly, I have to report the same thing. In it, Thank you for looking into this, much appreciated! |
Great, thank you, it's working now 👍 . (I get another error message now, but that one doesn't seem related to this plugin) |
My Setup
In my setup, the project itself is using Webpack 5 (RC) (owid/owid-grapher#621), but we're also using Storybook which is using Webpack 4.
Expected Behavior
When running
yarn build-storybook
,mini-css-extract-plugin
detects that it is not run with the project-wide Webpack install (5), but the Storybook-specific Storybook install (4), and setisWebpack4
accordingly.Actual Behavior
Instead,
mini-css-extract-plugin
fails with this error:The error implies that the command indeed runs with Webpack 4, but
mini-css-extract-plugin
believes it to be Webpack 5 and setsisWebpack4 = false
.Possible solution
I don't know what a possible solution could be, but maybe it makes sense for
compiler
or some other field to contain awebpackVersion
field to reliably detect the webpack version in use?cc @sokra
The text was updated successfully, but these errors were encountered: