As the title suggests, i cannot get the LESS source maps working. I can see the line at the end of my min.css, and can also see the .map file, but in Chrome dev tools it still shows the min.css info, not the LESS.
Are the paths right? The defaults in the Gruntfile use /app/themes/roots/ - did you update them based on your site? (e.g. /wp-content/themes/example/).
What browser are you using + what version?
Do you happen to have this up somewhere that we can access to see?
You can’t really troubleshoot the path issue until the source map is being created properly.
It’s not something I’ve seen before and I’m surprised that Grunt isn’t outputting an error. Perhaps check the GitHub pages for grunt-contrib-less and/or less.js.
When I was initially installing Roots and Grunt, I mistakenly installed Roots and NPM/Grunt before I properly installed Wordpress. I double backed and installed NPM again (right “over” the previous install?) I haven’t run into any complications due to this mistake - but this might be the first.
Does it sound like a possibility? What would you suggest as a course of action?
@Foxaii Thanks.
I did make the path changes before you mentioned it and it did not work because I had a “grunt watch” thread running.
On the page where @ben explains this somebody mentions this, but so that people are aware, I will also explain it here.
Please, be aware that you have to STOP your “grunt watch” thread if you have it running and retype grunt - without the watch - for the changes to take.
Hi, I seem to be having the same problem with the new version of roots. I followed these instructions: http://roots.io/using-less-source-maps/ but still don’t see the css in chrome developer tools. Before I did the tutorial I was able to see and search the css file under Elements but now I only see the map file and nothing in my sidebar. Hope that makes sense…
I can see the line at the end of main.css and see main.css.map… I also updated gruntfile.js and ran grunt.
After fighting with this issue for a while and checking and double checking my settings I finally figured out that autoprefixer was resetting my .css sourceMappingUrl
Changing autoprefixer:dev map options to this worked.