-
-
Notifications
You must be signed in to change notification settings - Fork 390
Closed
Description
Bug report
configure webpack with generator.asset.publicPath = '' and assetModule as below
module.exports = {
module: {
generator: {
asset: {
publicPath: '',
},
},
rules: [
{
test: /\.svg$/i,
oneOf: [
/* config.module.rule('svg').oneOf('svg-asset') */
{
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: 1000,
},
},
generator: {
filename: 'static/svg/[name].svg',
},
},
],
},
}Actual Behavior
webpack-dist/static/css/index.392c62df.css
.a {
background: url(../..//static/svg/react.svg);
}Expected Behavior
.a {
background: url(../../static/svg/react.svg);
}How Do We Reproduce?
https://github.com/SoonIter/rspack-css-extract-wrong-path
pnpm i
npm run build # both rspack and webpack
# or npm run build:webpack
Please paste the results of npx webpack-cli info here, and mention other relevant information
Metadata
Metadata
Assignees
Labels
No labels