Answer the question
In order to leave comments, you need to log in
Why doesn't Gulp + OpenServer see the sourcemap?
Gulp project is located in the gulp.dev folder
Open Server is running (it worked with it previously, gulp.dev is in the domains folder as expected)
Proxying is configured for browserSync so that you can work with Open Server and use php
gulp.task('browserSync', function () {
browserSync({
proxy: 'gulp.dev',
notify: false
});
});
Answer the question
In order to leave comments, you need to log in
Problem solved!
The map was not loaded due to an incorrect URL to the map, in the comments of the style file.
It was like this: /*# sourceMappingURL=styles.css.map */
And you need it like this: /*# sourceMappingURL=localhost3000/path/folder/styles.css.map */ You
need to make a pipe with URL adjustment.
.pipe(sourcemaps.write('./map', { // Выгружаем карту
sourceMappingURL: function (file) {
return ПутьБезФайлаКарты + file.relative + '.map'; // Правим коммент в стилях
}
}))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question