Skip to content

only generate css source map when cssSourceMap is enabled #1070

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

Closed
wants to merge 1 commit into from

Conversation

melonHuang
Copy link

Please only generate css source map when cssSourceMap is enabled.

Or it will cause the postcss-loader to throw a warning: Previous source map found, but options.sourceMap isn't set

The warning is triggered under this condition

if (sourceMap == undefined && map) {
      this.emitWarning(`\n\n ⚠️  PostCSS Loader\n\nPrevious source map found, but options.sourceMap isn't set.\nIn this case the loader will discard the source map entirely for performance reasons.\nSee https://github.com/postcss/postcss-loader#sourcemap for more information.\n\n`)
}

@yyx990803 yyx990803 closed this in 1809031 Dec 15, 2017
@yyx990803
Copy link
Member

The check had to be a bit more consistent with the CSS source map conditions, so I landed this with some tweaks. But thanks for making the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants