module.generator.asset.publicPath='/' throw error
See original GitHub issueBug report
{
module: {
// mini-css-extract-plugin HookWebpackError: Invalid URL: /assets/logo.635a60f2.jpg
generator: {
asset: {
publicPath: '/',
},
},
},
output:{
publicPath:'auto'
}
}
Actual Behavior
Expected Behavior
How Do We Reproduce?
{
module: {
generator: {
asset: {
publicPath: '/',
},
},
},
output:{
publicPath:'auto'
}
}
<!-- A great way to do this is to provide your configuration via a GitHub repository -->
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
<!-- Please only add small code snippets directly into this issue -->
<!-- https://gist.github.com is a good place for longer code snippets -->
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information
Issue Analytics
- State:
- Created 2 years ago
- Comments:31 (18 by maintainers)
Top Results From Across the Web
Webpack asset generator with publicPath not working?
I had the same problem, but i got it to work. The generator does not support publicPath. You have to use the output...
Read more >Asset Modules - webpack
Asset Modules is a type of module that allows one to use asset files (fonts, icons, etc) without configuring additional loaders. Prior to...
Read more >Webpack — Understanding the 'publicPath' mystery - Medium
So, we are utilizing resolve from path module. ERROR : Invalid configuration object. Webpack has been initialised using a configuration object ...
Read more >Webpack 5 - Asset Modules - DEV Community
In this article, I want to tell you about the Asset Modules - an ... which makes it possible to throw out a...
Read more >HTML and Static Assets - Vue CLI
During build, asset links will be injected automatically. ... See also: publicPath ... vue.config.js module.exports = { chainWebpack: config ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same problem. How to solve it
should work with https://github.com/webpack/webpack/discussions/15613