mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 14:21:23 +00:00
fix: svg webpack config (#7905)
Co-authored-by: 杨国璇 <ygx@MacBookPro.lan>
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user