-
Notifications
You must be signed in to change notification settings - Fork 31
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
[ARGG-775]: Fixed icon loading in JS and SCSS #177
Conversation
@@ -481,17 +486,6 @@ module.exports = function (webpackEnv) { | |||
// @remove-on-eject-end | |||
plugins: [ | |||
require.resolve('@loadable/babel-plugin'), | |||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed, a CRA4 legacy
@@ -134,7 +134,12 @@ module.exports = function (webpackEnv) { | |||
}, | |||
{ | |||
loader: require.resolve('css-loader'), | |||
options: cssOptions, | |||
options: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent creating separate files for data-* svg icons
@@ -427,9 +433,14 @@ module.exports = function (webpackEnv) { | |||
loader: require.resolve('@svgr/webpack'), | |||
options: { | |||
prettier: false, | |||
svgo: false, | |||
svgo: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking but we could consider not even needing this option as the latest version of svgr/webpack
sets this to true by default: https://react-svgr.com/docs/options/#svgo
plugins: [ | ||
{ | ||
name: 'preset-default', | ||
removeViewBox: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the docs this might not 'just work' and the config looks to be a bit more in an object to override: https://github.com/svg/svgo#default-preset
So possibly needs to be
params: {
overrides: {
removeViewBox: false
}
}
No description provided.