1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 06:11:16 +00:00

fix: svg webpack config (#7905)

Co-authored-by: 杨国璇 <ygx@MacBookPro.lan>
This commit is contained in:
杨国璇
2025-06-09 15:13:43 +08:00
committed by GitHub
parent f57f122b80
commit 75b81357ca

View File

@@ -450,9 +450,6 @@ module.exports = function (webpackEnv) {
}
}
],
issuer: {
and: [/\.(ts|tsx|js|jsx|md|mdx)$/],
},
},
// Process application JS with Babel.
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
@@ -596,34 +593,6 @@ module.exports = function (webpackEnv) {
'sass-loader'
),
},
// Handle svg icons
{
test: /\.svg$/,
use: [
{
loader: require.resolve('@svgr/webpack'),
options: {
prettier: false,
svgo: false,
svgoConfig: {
plugins: [{ removeViewBox: false }],
},
titleProp: true,
ref: true,
},
},
{ loader: 'svgo-loader', options: {
plugins: [
'removeTitle',
'removeStyleElement',
'cleanupIDs',
'inlineStyles',
'removeXMLProcInst',
]
}
}
]
},
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.