not generate css sourcemap when compile sass with mix.sourceMaps()
See original GitHub issueVersion
Laravel Mix Version: 0.12.1 Node Version: v6.6.0 NPM Version: 4.1.2 YARN Version: 0.22.0 OS: MacOS Sierra
Description:
not generate css sourcemap when compile sass with mix.sourceMaps() . But it generate css sourcemap correct when not call mix.sourceMaps(). Hoverer, it generate js sourcemap when call mix.sourceMaps() and it does not generate sourcemap when not call mix.sourceMaps().
Steps To Reproduce:
laravel new project yarn install dependence
default:
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
run npm run dev
app.js(no sourcemap)
app.css(sourcemap)
But
add sourceMaps()
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css').sourceMaps();
run npm run dev
app.js(sourcemap)
app.css(no sourcemap)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:20
- Comments:20 (1 by maintainers)
Top Results From Across the Web
not generate css sourcemap when compile sass with mix ...
sourceMaps(). Hoverer, it generate js sourcemap when call mix.sourceMaps() and it does not generate sourcemap when not call mix.sourceMaps().
Read more >Laravel Mix Sourcemaps not generating for production build
I couldn't find any documentation with Laravel Mix to support this though. Any idea how I can fix this?
Read more >sourceMaps problem with Laravel Mix - Laracasts
I'm experiencing a strange behavior when trying to generate source maps for my css and javascript files. I'm not able to generate source...
Read more >Elixir - Laravel guide
Compiling Assets (Laravel Elixir). Introduction; Installation & Setup; Running Elixir; Working With Stylesheets. Less; Sass; Stylus; Plain CSS; Source Maps.
Read more >Laravel 5.8 Compiling Assets (Mix) - ReaDouble
Though disabled by default, source maps may be activated by calling the mix.sourceMaps() method in your webpack.mix.js file. Though it comes with a...
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
@lorenaramonda Everything is still working as expected.
The one thing I noticed, however, is that you do need to have
.sourceMaps()
somewhere in your config or the source maps wont be connected. It doesn’t matter where, So I updated my little source map block.I feel it’s faster when you run a production build, Not scientific at all but it seems to be consistently a few seconds faster
Dev: 16.7 ( Sourcemaps ) Prod: 30 ( Sourcemaps ) Prod: 26.8 ( No Sourcemaps )
Hope that Helps.
I have exactly the same issue as you @green-mike and I found a temporary solution: Add these lines to webpack.mix.js
mix.webpackConfig({ devtool: "inline-source-map" });