Enable CSS sourcemaps in development
See original GitHub issueHi! Firstly, of course, thank you for this amazing project! 👏
I’ve seen the comments on sourcemaps: #109, #139, #494, #343, etc. but didn’t see one about enabling CSS sourcemaps. I thought I’d make a PR first but I wanted to discuss first and get to grips with this repo structure.
Since there aren’t breakpoints to worry about, this could be a very simple enhancement, e.g:
loader: 'style-loader!css-loader?'.concat(isProduction ? 'minimize' : 'sourceMap')
where const isProduction = process.env.NODE_ENV === 'production'
. Apologies if I am duplicating / creating noise, I thought I’d searched thoroughly.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to enable source maps for your browser. - gists · GitHub
Open Developer Tools. Mac users: View > Developer > Developer Tools. · Click the Settings cog icon in the upper-right corner of the...
Read more >Should I Use Source Maps in Production? | CSS-Tricks
Typically, source maps are a configuration option from the preprocessor. Here's Babel's options. I believe that with Sass, you don't even have ...
Read more >Getting started with CSS sourcemaps and in-browser Sass ...
CSS sourcemaps allow the browser to map CSS generated by a ... Open your developer tools settings, and under Workspace add your site's...
Read more >Using SASS source maps with Chrome (Example) - Coderwall
Next open the Chrome developer tools pane, click on settings (the gear in the bottom right corner). · Navigate to Experiments and click/enable...
Read more >Chrome not loading CSS source maps? - Stack Overflow
5 Answers 5 · Make sure that CSS maps are enabled in Dev tools settings. · Check the end of CSS file whether...
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 Free
Top 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
as @skaltenegger wrote the config for webpack 2 is
I got CSS sourcmaps and hot reloading working by following @mareksuscak’s advice of changing my css loader in the webpack config to the following:
{ test: /.css$/, loader: ‘style!css?sourceMap!postcss’ },
And I can’t complain about FOUC (flash of unstyled content) - so all good for development!
Hope that may help someone here! 😎