-
-
Notifications
You must be signed in to change notification settings - Fork 384
2.4.2 Breaks on urls #855
New issue
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
Comments
It means you have wrong urls, maybe out of root project, without reproducible example I can't help |
Or please provide options for plugin |
No options for the plugin. I figured it out: {
test: /\.svg/,
type: 'asset/resource',
generator: {
- publicPath: isDev ? '/' : 'https://foo.com/assets/'
+ publicPath: isDev ? undefined : 'https://foo.com/assets/'
}
} This was a long standing app with that config for a couple years fyi. |
I found that the following options works for me to solve this breaking change: const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
// ...
module: {
rules: [
{
test: /\.css$/,
use: [
- MiniCssExtractPlugin['loader'],
+ {
+ loader: MiniCssExtractPlugin['loader'],
+ options: { publicPath: '' },
+ },
'css-loader',
],
},
],
},
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Actual Behavior
Every instance of a url e.g.:
Throws a build error:
Since upgrading from 2.3.0 -> 2.4.2
Expected Behavior
The build should succeed. Nothing else changed. The file path is valid.
I am on the latest webpack (5.58.1).
Setting
experimentalUseImportModule: false
fixes it but I'm not sure what that does.Might be an unintentional breaking change.
How Do We Reproduce?
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: