How to configure grunt file to generate source maps with LESS ?

Technical Support
  • #1

    Hi, i want to configure grunt file to generate source maps compatible with FireFox Developer Tools.
    Tried add this to grunt.js:

    grunt.initConfig({
    	watch: {
    		options: {
    				strictImports : true,
    				sourceMap: true,
    			        sourceMapFilename: 'public/stylesheet.css.map',
    				sourceMapURL: 'http://127.0.0.1:4567/stylesheet.css.map'
    			}
    		lessUpdated_Client: {
    			files: [
    				'public/*.less',
    				'node_modules/nodebb-*/*.less', 'node_modules/nodebb-*/**/*.less',
    				'!node_modules/nodebb-*/node_modules/**',
    				'!node_modules/nodebb-*/.git/**'
    			]
    		},
    
  • Plugin & Theme Dev
    #2

    Grunt is not compiling the less files of NodeBB. It just watches changes and notifies (or restarts) NodeBB. NodeBB itself manages the compilation of LESS files.
    I assume this would be the place to add such options.

  • GNU/Linux
    #3

    If you're interested in tackling this issue, note that the UglifyJS version we use may not produce working source maps.

    The source map also has to be able to access libraries from node_modules/, so that's another complication.


Suggested Topics


  • 0 Votes
    2 Posts
    207 Views

  • 0 Votes
    1 Posts
    125 Views

  • 0 Votes
    4 Posts
    1343 Views

  • 0 Votes
    3 Posts
    1313 Views

  • nginx configuration

    Technical Support
    0 Votes
    1 Posts
    1432 Views

| | | |