-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support for Webpack v5 #1703
Comments
Feel free to send a pull request with a fix! However, we'll have to support webpack 4 and 5 for some time. |
#1707 now fixes everything Styleguidist needs to support Webpack 5 |
Refs #1703 * Inline loaders and ! prefixes should not be used as they are non-standard. They may be used by loader generated code. https://webpack.js.org/configuration/module/#ruleenforce * Adds support for both Webpack 4 and 5 in StyleguidistOptionsPlugin * Updates dependencies in Webpack example (easier to test against) * Because automatic polyfilling is switched off in 5, assert was brought in as a dependency (it's used by Doctrine, see below) ## Upstream issues Both issues below are tied to facebook/create-react-app#7929: * Process is not defined - The page still builds but this error will show in the console. I can't seem to polyfill this if anyone else can that would be great, then I think we're done. * TypeError: message.split is not a function - you may not get this error, but if you do it's related to facebook/create-react-app#7929. The quick fix is to go into node_modules/react-dev-utils/formatWebpackMessages.js:19 and add the code from facebook/create-react-app#7929 (comment) ## Not needed for this but nice to have. Doctrine should be replaced with another JSDoc parser. Doctrine is end of life and no longer supported. It causes problems with Webpack 5 because it pulls in assert which WP5 does not polyfill. For now, we can fix it by adding those polyfills (assert) but a more stable solution should be found. The issue raised: #1708
🎉 This issue has been resolved in version 11.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Reopening since it's only partially fixed. |
Mainly waiting on |
Is there any plan to add support for Webpack v5?
I get this deprecation warning for
styleguidist server
this is ok it does eventually run.
the biggest problem is build, that completely fails.
styleguidist build
To reproduce
Update to webpack v5 and try building with Styleguidist
The text was updated successfully, but these errors were encountered: