-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
Labels
featNew feature or requestNew feature or requeststaleteamThe issue/pr is created by the member of Rspack.The issue/pr is created by the member of Rspack.
Description
What problem does this feature solve?
https://github.com/SoonIter/rspack-asset-module-publicPath-auto
input
// src/index.ts
import x from './assets/react.svg';expected output
rspack-dist/index.js
rspack-dist/static/svg/react.svg
module.exports = "./static/svg/react.svg";actual output
rspack-dist/index.js
rspack-dist/static/svg/react.svg
module.exports = "../../static/svg/react.svg";😭 the auto public path is based on static/svg/react.svg not index.js
webpack output
module.exports = "autostatic/svg/react.svg";
😂 This feature is not supported in Webpack currently
What does the proposed API of configuration look like?
module: {
generator: {
asset: {
publicPath: 'auto'
}
},
rules: [
{
test: /\.svg$/,
type: 'asset',
},
]
}
Timeless0911
Metadata
Metadata
Assignees
Labels
featNew feature or requestNew feature or requeststaleteamThe issue/pr is created by the member of Rspack.The issue/pr is created by the member of Rspack.