We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b737bd6 commit c17250fCopy full SHA for c17250f
packages/react-scripts/config/webpack.config.bundle.esm.js
@@ -139,14 +139,14 @@ module.exports = function (webpackEnv) {
139
const svgRule = config.module.rules[oneOfRuleIndex].oneOf.find(
140
rule => String(rule.test) === '/\\.svg$/'
141
);
142
+
143
if (shouldProduceCompactBundle) {
144
/**
145
* We want all SVG files become part of the bundle.
146
*/
- svgRule.type = 'asset/inline';
147
- delete svgRule.use;
+ delete svgRule.oneOf.splice(0, 1);
148
} else {
149
- svgRule.use[1].options.name = '[name].[hash].[ext]';
+ svgRule.oneOf[0].use[1].options.name = '[name].[hash].[ext]';
150
}
151
152
0 commit comments