Incompatible with external CSS sourcemaps
See original GitHub issueI’m trying to add this to a project that uses ember-cli-sass (in case #18 is relevant) and Ember-CLI’s built-in sourcemaps support.
My configuration before adding this:
sassOptions: {
includePaths: [ 'app/styles', 'vendor/styles' ],
imagePath: 'public/images',
outputStyle: 'expanded'
},
sourcemaps: {
enabled: true,
extensions: [ 'js', 'css' ]
}
This caused sourceMappingURL
s to appear in my compiled CSS files. These were external links.
When I added
autoprefixer: {
browsers: [
...
]
}
I started getting unknown word
errors.
I found #18 and https://github.com/kimroen/ember-cli-autoprefixer/issues/9 and tried changing my configuration to
autoprefixer: {
browsers: [ ... ],
sourcemap: true
},
sassOptions: {
...,
sourceComments: false
},
sourcemaps: {
enabled: true,
extensions: [ 'js' ]
}
This works, but causes the CSS sourcemaps to be emitted as inline data URIs, which dramatically increase the weight of the CSS files. (So much so that it’s not worth it to minify at all!)
Is there a way to get this to work with external CSS sourcemaps?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Produce sourcemap from compiled SASS in webpack4
For my SCSS files: compile Sass from a given directory, add prefixes, and output a single css file onto an specific folder, including...
Read more >CSP: style-src - HTTP - MDN Web Docs - Mozilla
The HTTP Content-Security-Policy (CSP) style-src directive specifies valid sources for stylesheets.
Read more >Source Maps - SurviveJS
Source maps in Chrome. When your source code has gone through transformations, debugging in the browser becomes a problem. Source maps solve this...
Read more >Dart Sass Command-Line Interface
sass --error-css style.scss style.css /* Error: Incompatible units em and px. ... Dart Sass generates source maps by default for every CSS file...
Read more >sass-loader - webpack - JS.ORG
To enable CSS source maps, you'll need to pass the sourceMap option to the sass-loader and the css-loader. webpack.config.js module.exports = { devtool:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like fast-sourcemap-concat is generating JS-style sourcemaps comments:
This causes autoprefixer to blow up on the invalid CSS. Doesn’t seem to be (directly) a problem with this library.
Stack trace for the
unknown word
Linked trace:
Possibly related: