-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
svgr/webpack@6 is incompatible with webpack@4 due to usage of this.getOptions webpack method #665
Comments
In fact it should: https://react-svgr.com/docs/migrate/#webpack We are moving forward, not backward. If you use webpack 4, then you should stick to SVGR v5. |
@gregberge can this be listed in the breaking changes for v6? Totally understand not sticking to old standards, but it would have saved some time for me today to know ahead of time that we wouldn't be able to upgrade yet. EDIT: Sorry, just saw the migration docs. Would have also been helpful to see this in the release notes for v6 in GitHub. |
@smckinney1 I mentioned the migration guide in the release note. |
babel/helper-builder-react-jsx held back because of babel/babel#14886, can be upgraded once the fix is released svgr needs to stay @v5: gregberge/svgr#665 (comment) "We are moving forward, not backward. If you use webpack 4, then you should stick to SVGR v5." eslint-loader -> eslint-webpack-plugin @ v2 from https://www.npmjs.com/package/eslint-loader "This loader has been deprecated. Please use eslint-webpack-plugin" from https://webpack.js.org/plugins/eslint-webpack-plugin/ "This is eslint-webpack-plugin 3.0 which works only with webpack 5. For the webpack 4, see the 2.x branch." TODO: still need to do "babel-eslint": "^10.1.0", -> "@babel/eslint-parser": "^7.0.0" + "@babel/eslint-plugin": "^7.0.0", eslint 7 -> 8 didn't work easily for me..
babel/helper-builder-react-jsx held back because of babel/babel#14886, can be upgraded once the fix is released svgr needs to stay @v5: gregberge/svgr#665 (comment) "We are moving forward, not backward. If you use webpack 4, then you should stick to SVGR v5." eslint-loader -> eslint-webpack-plugin @ v2 from https://www.npmjs.com/package/eslint-loader "This loader has been deprecated. Please use eslint-webpack-plugin" from https://webpack.js.org/plugins/eslint-webpack-plugin/ "This is eslint-webpack-plugin 3.0 which works only with webpack 5. For the webpack 4, see the 2.x branch." TODO: still need to do "babel-eslint": "^10.1.0", -> "@babel/eslint-parser": "^7.0.0" + "@babel/eslint-plugin": "^7.0.0", eslint 7 -> 8 didn't work easily for me..
Just hit this myself. |
I created a PR to add this to the changelog file. Since I hit this myself as wel today. |
The subject
svgr/webpack@6 is incompatible with webpack@4 due to usage of this.getOptions added in webpack@5
Last working version
Worked up to version: svgr/webpack@5
Stopped working in version: svgr/webpack@6
To Reproduce
Try to run @svgr/webpack@6 with webpack@4.
Expected behavior
@svgr/webpack loader usage should not to cause crash in build made with webpack@4.
Link to repl or repo
The example repo
Run
npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard
The text was updated successfully, but these errors were encountered: