Add optional flag to disable sourcemaps
See original GitHub issueWe use environment specific builds, Please add optional disable flag to sourcemaps.init()
to enable or disable sourcemaps generation.
global.env = process.env.NODE_ENV || 'DEV';
gulp.task('styles', function () {
return gulp.src('app/styles/*.scss')
.pipe($.plumber())
.pipe($.rubySass({
style: 'expanded',
precision: 10,
sourcemap: (env === 'DEV'), //Only enable sourcemap for DEV env.
loadPath: ['bower_components/bourbon/dist','bower_components/compass-mixins/lib']
}))
.pipe($.autoprefixer('last 2 version'))
.pipe(gulp.dest('.tmp/styles'));
});
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Is there a command line flag to disable JavaScript source ...
Based on the Chromium flags list peter.sh/experiments/chromium-command-line-switches it seems there isn't any flags to disable the JavaScript Source map files ...
Read more >Source Maps - SurviveJS
By disabling source maps, you are performing a sort of obfuscation. ... Inline source maps add the mapping data directly to the generated...
Read more >Source Maps - Parcel
Parcel utilizes the @parcel/source-maps package for processing source maps to ensure ... Each function that adds mappings has optional offset arguments.
Read more >Source Maps - Rollbar Docs
Getting started · 1. Raise descriptive errors from JavaScript · 2. Configure the rollbar.js SDK to support source maps · 3. Upload your...
Read more >Source Maps | webpack surviveJS - GitHub Pages
It's possible you don't want to generate a source map for your production bundle as this makes it effortless to inspect your application....
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
Just use
gulp-if
:Without any external plugins, use
Transform
from node stream to returnnext(null, file)
(whatever in development or production mode). This implementation use classes 😁Then run:
You can also use
SourceMaps
around tasks by create/exportSourceMaps
as module. Examplemodule.exports = SourceMaps
and import it🔥