You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support resolve-url-loader, sass-loader?sourceMap #1124
I'm submitting a ...
[ ] bug report
[ V ] feature request
[ V ] question about the decisions made in the repository
Do you want to request a feature or report a bug?
feature(but in the view of resolve-url-loader & sass-loader, it's a Bug)
What is the current behavior?
resolve-url-loader doesnt work in this version of this repo
also sass-loader doesnt work if use it with parameter 'sourceMap',
see below for more details
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
I will get the ERROR : path must be a string. Received undefined
What is the expected behavior?
it should be work ( like i use it in webpack 1 )
Please tell us about your environment:
same as latest verison of this repo
Browser: Chrome
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) url(), @Import & nested resources are so frequently used in stylesheet, i think it will be great if support these functionality.
Following worked for me..in webpack.dev.js I updated loader like following
{
test: /.scss$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader", options: {
sourceMap: true
}
}, {
loader: "sass-loader", options: {
sourceMap: true
}
}],
include: [helpers.root('src', 'styles')]
}
Then in same file, in LoaderOptionsPlugin I updated following
new LoaderOptionsPlugin({
debug: true,
options: {
context: __dirname,
output: { path : './' },
}
})
Activity
Evlos commentedon Nov 4, 2016
+1
k-schneider commentedon Nov 8, 2016
Just bumped into this as well as I was working on upgrading from 5.0.5.
Source maps WERE working.
Abhijith-Nagaraja commentedon Nov 15, 2016
I finally found a way to fix this.
First of all. The problem why it was occurring was due to this line in the sassLoader
result.map.sources[0] = path.relative(self.options.context, resourcePath);Here, the following object was always null.
Even if I passed the context in Webpack.common.config, it was still null.
So finally, correct way of doing is,
Add the following in the respective config files and not the webpack.common.config
luchillo17 commentedon Dec 23, 2016
@Abhijith-Nagaraja I'm having this issue, and even with the
LoaderOptionsPluginset i keep getting the same error.Here's mine:
luchillo17 commentedon Dec 23, 2016
Damn typos, is
output, notoutupt, now the error says:It seems i have misconfigured the
resolve-url-loaderor thefile-loaderfor png's files when importing primeng.debslab commentedon Feb 7, 2017
Following worked for me..in webpack.dev.js I updated loader like following
{
test: /.scss$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader", options: {
sourceMap: true
}
}, {
loader: "sass-loader", options: {
sourceMap: true
}
}],
include: [helpers.root('src', 'styles')]
}
Then in same file, in LoaderOptionsPlugin I updated following
new LoaderOptionsPlugin({
debug: true,
options: {
context: __dirname,
output: { path : './' },
}
})