Closed JiDai closed 7 years ago
I have the same problem, as I understand it's a problem with the ExtractTextPlugin.
Solved specifying publicPath: "../"
on the ExtractTextPlugin.extract()
invocation, as follows:
module: {
rules: [
{
test: /\.scss$/,
use: extractSass.extract({
use: [
{
loader: "css-loader",
options: {
sourceMap: true
}
},
{
loader: "sass-loader",
options: {
sourceMap: true
}
}
],
publicPath: "../",
})
},
]
}
But then I don't need resolve-url-loader
anymore because I don't have nested assets.
Thanks @Danita
So @JiDai I am going to close this issue based on @Danita's solution. We can reopen later if necessary.
Ok thanks, the option publicPath
in Extract plugin did worked for me.
But I did not specified the webpack publicPath
correctly, so once that fixed, it worked.
Here is my tree :
Here my loader config
And the output tree I want :
In
buttons.sccs
file I put :But it will be resolve in css file as :
Why ? I don't understand how the path in CSS compiled file is deduced Thanks,