Prevent minified version of source maps?
See original GitHub issueHow do I prevent this plug-in from compiling a minified version of the source map? Example:
This is what I have in my gulpfile for this task:
// Compile Our Sass
gulp.task('sass', function() {
return gulp.src('*.scss')
.pipe(sourcemaps.init())
.pipe(sass(sassOptions).on('error', sass.logError))
.pipe(autoprefixer())
.pipe(gulpIf('*.css', minifyCss()))
.pipe(rename({
suffix: '.min'
}))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./'));
});
If I just do: .pipe(minifyCss())
it doesn’t create a .min version of oneweb.css, it just creates compressed/minified css in that file. 😦
Issue Analytics
- State:
- Created 8 years ago
- Comments:31
Top Results From Across the Web
Prevent minified version of source maps? · Issue #716 - GitHub
This is what I have in my gulpfile for this task: // Compile Our Sass gulp.task('sass', function() { return gulp.src('*.scss') .pipe(sourcemaps.
Read more >Disable source maps in Chrome DevTools - Stack Overflow
Open Developer Tools, go to "Settings" for Developer Tools, then uncheck Enable JavaScript Sourcemaps under the "Sources" settings.
Read more >How to Not Minify Source with webpack - David Walsh Blog
To prevent webpack from minifying the source, add the following to ... use devtool: 'source-map' to enable high-resolution source maps for ...
Read more >Should I Use Source Maps in Production? | CSS-Tricks
A “source map” is a special file that connects a minified/uglified version of an asset (CSS or JavaScript) to the original authored version....
Read more >Don't be shady, deploy your JavaScript source maps - Ctrl blog
Source code minification is beneficial, but the resulting obfuscation reduces trust and transparency. Source maps can help restore these and ...
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
@jaminroe this should do it for you. This clones the source, allowing you to get to the source stream BEFORE it became the sourcemap.
BTW, if you’re deploying code to production, and want to log what kind of errors your customers/users are getting (with a tool like Sentry/Raven for examples), sourcemaps of minified code will show you the real error and not a cryptic minified file one. They’re actually very useful.
Hello. I may be able to offer some advice on this issue. FYI gulp-minify-css is deprecated, advising to use gulp-cssnano. I got around the minifying of sourcemaps by using gulp-ignore and excluding the map pattern before running nano: