-
Notifications
You must be signed in to change notification settings - Fork 74
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
Webpack 5.1.3 and PublicPath auto #95
Comments
yeah not sure either. Possibly the following is correct, but I'm not sure if that makes extract-loader handle 'auto' correctly: diff --git a/src/extractLoader.js b/src/extractLoader.js
index 677388d..6859ba9 100644
--- a/src/extractLoader.js
+++ b/src/extractLoader.js
@@ -216,7 +216,8 @@ function getPublicPath(options, context) {
return context.options.output.publicPath;
}
- if (context._compilation && context._compilation.outputOptions && "publicPath" in context._compilation.outputOptions) {
+ if (context._compilation && context._compilation.outputOptions && "publicPath" in context._compilation.outputOptions &&
+ context._compilation.outputOptions.publicPath !== 'auto') {
return context._compilation.outputOptions.publicPath;
} |
@isaacl tried it with |
Here's the |
Webpack: 5.1.3
extract-loader: 5.1.0
there's this PR webpack/webpack#11258 that was merged and released as part of Webpack 5.1.3 which changes the default
publicPath
option toauto
.and
getPublicPath
function that refers to the variable in this linewhich result in
require("./assets/styles/style.css")
being resolved to<link rel="stylesheet" href="autoad70c8b2da42929dc855c3fd20c749b2.css"/>\n'
notice the
auto
.I personally do not have any context on how this should be properly handled for
extract-loader
.If any veteran would provide a direction I can make the changes and submit a PR.
for people that needs a quick fix, just explicitly provide the option of publicPath as empty string like so
The text was updated successfully, but these errors were encountered: