-
-
Notifications
You must be signed in to change notification settings - Fork 208
refactor(index): improve sourceMap
warning message (options.sourceMap
)
#321
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
Conversation
@teazean can you describe use case for this? |
When I was developing, I was confused by the warning tip。
But I have already set sourceMap to false, I suspected some configuration is still wrong. It wasted a lot of time finding out why I got a warning. I think warning tip should be more precise. |
@teazean this mean previous loader return source map, you should disable source map on all loaders, this message allow to track this problem (i.e. you previous loader generate source map but other loader after postcss don't get source map, you just spend build time on generate source maps but you don't use) |
@evilebottnawi
By the way, if I set |
@teazean This warning is mainly displayed if you have a previous source map ( webpack.config,js // 1
{
test: /\.scss$/.
use: [
...,
{ loader: 'postcss-loader', options: {} }, // warning
{ loader: 'sass-loader', options: { sourceMap: true } }
]
},
// 2
{
test: /\.scss$/.
use: [
...,
{ loader: 'postcss-loader', options: { sourceMap: false } }, // warning
{ loader: 'sass-loader', options: { sourceMap: true } } // if false/unset => no warning
]
} but the main (your) issue is that currently explicitly setting |
sourceMap === undefined
for warning display (options.sourceMap
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide your current webpack.config.js
aswell
@michael-ciniawsky Here is my warning tip. And below is my webpack config for vue-loader options.
The file compiled with warning is a Vue file with no |
@michael-ciniawsky Or we can change the tip, not using |
@teazean If the |
@michael-ciniawsky |
I think it's just a wording issue for the warning message. |
I'm of course open to improve the warning message if it's misleading/confusing :) |
@michael-ciniawsky Looking forward to your warning improvement. |
😞 Sorry for reopening this PR, and I will push the improved warning. |
sourceMap === undefined
for warning display (options.sourceMap
)sourceMap
warning message (options.sourceMap
)
Type
SemVer
Issues
#1
Checklist