Combined with stylus produced wrong sourcemap
See original GitHub issueHi! There is my config:
gulp.task('cssbuild', function () {
gulp.src(paths.stylSrc)
.pipe(sourcemaps.init())
.pipe(stylus())
.pipe(postcss([
autoprefixer({ browsers: ['ie >= 9', 'last 2 versions'] }),
csso()
]))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(paths.output));
})
after that I get only partly work source map for example:
if I not use gulp-postcss or use ‘poststylus’ with autoprefixer inside (poststylus allow use postcss like stylus plugins) - everything works fine.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
sourcemap paths are incorrect and doubled on webpack4 with ...
there is a problem with generated paths in sourcemap for stylus files, for example, with dir structure like this:
Read more >Can't get Gulp to reference Stylus files to generate sourcemaps
I'm having issues trying to generate sourcemaps for my CSS files. My current stack is: Gulp; Stylus; Autoprefixer.
Read more >source-map-loader - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >What is wrong with SOURCE MAPS and how not to mess with ...
The browser first shows links to the generated code, downloading sourcemaps in the background, after which it replaces links to the source ...
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
So I investigated further, and it looks that the problem might be in the combination with postcss-csso, that is not a real postcss plugin, because it converts between different ASTs internally. Try using it as a gulp plugin gulp-csso, and include after postcss in your gulp pipeline.
Change this
to this:
cc @lahmatiy