We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is the current behavior?
With following webpack config:
// webpack.config.js module.exports = { entry: 'index.css', output: { publicPath: 'aaa.com/aa/', }, module: { rules: [{ test: /\.png$/, type: 'asset/resource' }], }, experiments: { css: true, }, }
/* index.css */ .a { background-image: url(./bg.png); }
will generate:
.foo { background-image: url(bg.png); /* <-- wrong */ } head{--webpack-main:\.\/index\.css;}
What is the expected behavior?
It should generate:
.foo { background-image: url(aaa.com/aa/bg.png); } head{--webpack-main:\.\/index\.css;}
// webpack.config.js module.exports = { entry: 'index.css', output: { // publicPath: "auto" is default value cssFilename: 'css/[name].css', assetModuleFilename: 'assets/[name][ext]', }, module: { rules: [{ test: /\.png$/, type: 'asset/resource' }], }, experiments: { css: true, }, }
.foo { background-image: url(assets/bg.png); /* <-- wrong */ } head{--webpack-main:\.\/index\.css;}
.foo { background-image: url(../assets/bg.png); } head{--webpack-main:\.\/index\.css;}
Other relevant information: webpack version: 5.76.3 Node.js version: 18 Operating System: osx
The text was updated successfully, but these errors were encountered:
Thank you for report, I will move it inside #14893, because it is still under experiments, we can have many bugs
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Bug report
Case 1: publicPath is not "auto"
What is the current behavior?
With following webpack config:
will generate:
What is the expected behavior?
It should generate:
Case 2: publicPath is "auto"
What is the current behavior?
With following webpack config:
will generate:
What is the expected behavior?
It should generate:
Other relevant information:
webpack version: 5.76.3
Node.js version: 18
Operating System: osx
The text was updated successfully, but these errors were encountered: