Skip to content
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

Merged
merged 2 commits into from
Nov 9, 2023
Merged

Conversation

xalechez
Copy link

@xalechez xalechez commented Nov 9, 2023

No description provided.

@@ -481,17 +486,6 @@ module.exports = function (webpackEnv) {
// @remove-on-eject-end
plugins: [
require.resolve('@loadable/babel-plugin'),
[
Copy link
Author

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: {
Copy link
Author

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,
Copy link
Member

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,
Copy link
Member

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
    }
}

@xalechez xalechez merged commit 9bad9cd into fork_cra5 Nov 9, 2023
2 checks passed
@xalechez xalechez deleted the ARGG-775 branch November 30, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants