PostCSS should support optional charset parameter in inline sourcemaps
See original GitHub issueAccording to RFC2397 data:uri
scheme may include optional charset parameter for text mime types.
Suppose, we have a generated file with unicode symbols and inlined sourcemap with a specified charset (we want to view it in Chrome DevTools). For example:
.test {
content: 'привет';
}
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,...*/
Right now if we try to use PostCSS with this file it fails with error:
Error: Unsupported source map encoding charset=utf-8;base64
I think PostCSS should consider optional charset (at least utf-8
) and correctly apply previous sourcemap in this case.
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
PostCSS API
Parses source css and returns a new Root or Document node, which contains the source CSS nodes. // Simple CSS concatenation with source...
Read more >html/node_modules/postcss ... - GitLab
PostCSS is a tool for transforming CSS with JS plugins. These plugins can support variables and mixins, transpile future CSS syntax, inline images, ......
Read more >postcss - npm
PostCSS is a tool for transforming CSS with JS plugins. These plugins can support variables and mixins, transpile future CSS syntax, inline images, ......
Read more >postcss | Yarn - Package Manager
PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS...
Read more >postcss -u autoprefixer Error: Unsupported source map ...
I updated the version of postcss l, postcss-cli and autopixer to 8.1.0 which supports utf-8 charset then it started working.
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
I get an error with “Error: Unsupported source map encoding charset=utf8;base64” NOTE that
utf8
instead ofutf-8
Changed
let utf64 = 'data:application/json;charset=utf-8;base64,';
line tolet utf64 = 'data:application/json;charset=utf8;base64,';
temporarily fixed the issue. Do you think this is a common case?
@ai Ok just created https://github.com/postcss/postcss/issues/799