Open wizardion opened 4 years ago
@wizardion I ran into the same issue, caused by extract-loader
attempting to resolve requires without considering aliases.
I forked the repo and fixed this issue - you can always try and giving it a spin to see if it works for you as well.
@vseventer I resolved my problem by getting rid of this horrible extract-loader
in my main HTML file template. The extract-loader
also brokes my AngularJS templates in my project.
I used it only for ejs
variables in my main HTML template, within such configuration:
module: {
rules: [
{
test: /\.html$/,
use: [
"ejs-loader",
"extract-loader",
"html-loader"
]
}
]
}
So I changed the main template of my application to *.ejs
file extension to allow my HtmlWebpackPlugin
to serve the the ejs
variables and got rid of extra loaders. The "html-loader" is still in use for all other HTML files in my project.
But the main issue with this loader is still present, and I don't know why it's not going to be fixed for so long time... 'cause this issue exists from v3.0.0. It's frustrating by spending so much time figuring out for just a simple problem.
Can we get this PR merged in and released? I'm having the same alias issue.
When WebPack has aliases propery:
and
extract-loader
is being used with anhtml-loader
end temple that uses aliases
default
:extract-loader
- gives me an error:But with the same configuration and old version
"extract-loader": "^2.0.0"
- everything is working just fine! Is there something wrong happening with the extract-loader?