Skip to content

Commit 661f07c

Browse files
committed
fix: turn off svgo from @svgr/webpack to preserve our scss class names within the svg. see https://react-svgr.com/docs/options/#svgo [run ci]
1 parent da958e4 commit 661f07c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/web-config/webpack.config.base.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,15 @@ export const getCommonConfig = () => {
191191
{
192192
test: /\.svg$/i,
193193
issuer: /\.[jt]sx?$/,
194-
use: ['@svgr/webpack'],
194+
use: [{
195+
loader: '@svgr/webpack',
196+
options: {
197+
// we leverage classes in our svgs that correspond to scss classes.
198+
// svgo prefixes these classes be default, which we don't want, so we must disable it
199+
// @see https://react-svgr.com/docs/options/#svgo
200+
svgo: false,
201+
},
202+
}],
195203
},
196204
{
197205
test: /\.wasm$/,

0 commit comments

Comments
 (0)