Debug source maps loading on Chrome

廉价感情. 提交于 2020-01-03 18:43:08
问题 I generate source maps for javascript files during minification. The map files are referenced using a relative URL from the minified JS files that sit next to the map files. Here is an example comment at the end of app-e47a6637.js : //# The source map resolution works as expected in Firefox. However, Chrome does not load the map files. Additional information: JS source maps are of course enabled in the settings. I tried putting a proxy between Chrome and

Gulp-sass : scss file not compiled + variables

我们两清 提交于 2019-12-25 09:45:37
问题 I'm new on using Gulp and gulp-sourcemaps for sass files. I encouter an issue when compiling scss file. So I finally think sourcemaps is the guilt because when I open the last created file, I don't find mention of my last scss file modified and compiled.(but not if I disable sourcemap creation). In addition, path to scss files in firebug isn't the right one.This is my gulp task: var basePaths = { src: './sass/**/*.scss', // fichiers scss à surveiller dest: './css/', // dossier à

Visual Studio Code debugging chrome, Breakpoints wont hit

佐手、 提交于 2019-12-21 04:21:35
问题 I have a Angular2/typescript app I am developing in VSCode. I use Gulp to build the typescript files and gulp-sourcemap to create map files. Attaching/launching chrome works well after some tinkering with the chrome debug extension for VSCode, but I cannot get the breakpoints to hit. I run the website with "dnx web", but I don't think that should matter. My folder structure is like this: project/wwwroot/index.html project/wwwroot/app/myfile.js project/wwwroot/app/ project/scripts

Browserify Babelify Uglify source map sources do not get loaded in Google Chrome

亡梦爱人 提交于 2019-12-12 17:17:59
问题 I generated a js file with a source map using the following gulp task. The original sources get loaded in Firefox but do not get loaded in Chrome. Can anyone point out why Chrome can't find the sources which are clearly included in the generated index-[hash] gulp.task('browserify', function () { // set up the browserify instance on a task basis return browserify({ debug: true }) .transform(babelify) .require('client/web/private/js/es6/index.js', { entry: true }) .bundle() .on('error',

gulp sourcemaps not writing expected sourcemap

孤街醉人 提交于 2019-12-11 13:46:55
问题 Here is the task: dev.assets.sass = [ 'client/modules/*[!public]*/scss/*.scss' ]; gulp.task('sass', function () { gulp.src(dev.assets.sass) .pipe(sourcemaps.init()) .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError)) .pipe(concat('application.min.css')) .pipe(sourcemaps.write('./maps')) .pipe(gulp.dest('./client/build')); }); The issue is that the source map looks like this: {"version":3,"sources":["../../stdin"].... which is not what I expected. I would like something similar

how to debug gulp-sourcemaps not doing anything?

梦想与她 提交于 2019-12-10 14:47:52
问题 I have a fairly standard use case for gulp-sourcemaps gulp.src( bundle.src) .pipe(sourcemaps.init()) .pipe(concat(bundle.dst + '.' + opts.ext)) .pipe(uglify()) .pipe(sourcemaps.write()) .pipe(gulp.dest('./public/built')); This produces appropriately concatenated and uglyified files. However there are no source map additions to them. bundle.src is an array of file paths. Not sure how to debug this. 回答1: You should look into gulp-util. It may give you

Gulp-Sourcemaps, SyntaxError: Unexpected token >

六月ゝ 毕业季﹏ 提交于 2019-12-07 08:22:23
问题 Gulp / npm noobie here. I'm trying to use gulp-sourcemaps, and for some reason, it crashes on var sourcemaps = require('sourcemaps') .(It crash only when this line's in the file) gulpfile: var gulp = require('gulp'); var uglify = require('gulp-uglify'); var concat = require('gulp-concat'); var sourcemaps = require('gulp-sourcemaps'); gulp.task('generateApp', function () { return gulp.src([some paths...]) .pipe(sourcemaps.init()) .pipe(concat('app.min.js')) .pipe(uglify()) .pipe(sourcemaps

Path to source map is wrong

情到浓时终转凉″ 提交于 2019-12-06 08:35:23
问题 I use the packages gulp-less and gulp-sourcemaps . My less file is located under Styles/main.less , but the generated source map points to source/main.less (where source/ seems to be a prefix). How to fix this, so the source map correctly points to source/Styles/main.less ? My gulp task is rather simple: var gulp = require('gulp'), less = require('gulp-less'), gulpif = require('gulp-if'), sourcemaps = require('gulp-sourcemaps'); var paths = { styles: [ 'Styles/**/*.less', '!**/*.min.css' ],

Gulp SASS Sourcemap sources are incorrect

我的梦境 提交于 2019-12-06 05:07:41
问题 I am struggling to get my SASS sourcemaps to work correctly. The problem seems to be the "sources" attribute within the sourcemap and how my SASS files are nested. I have a Gulp task that compiles SASS to CSS. Here is an example of that var paths = { styles: { src: './Stylesheets/SCSS/', files: './Stylesheets/SCSS/**/*.scss', dest: './Stylesheets/CSS/' } } gulp.task('compile-sass', function (){ return gulp.src(paths.styles.files) .pipe(sourcemaps.init()) .pipe(sass({ outputStyle: 'compressed'

Gulp sourcemaps with TypeScript and Babel

廉价感情. 提交于 2019-12-05 22:49:47
问题 I am currently writing a side project where I can learn more about TypeScript and ES6 (using babel). I wanted to use ES6 with my TypeScript, so I settled on the following workflow. Typescript (ES6) -> Babel (ES6) -> ES5 Now I am using Gulp to automate all of this, and I am having a hard time getting the sourcemaps to generate properly. I should mention that this style was suggested to me by a user on /r/typescript so I am not even sure if it is possible. Anyways here is my current gulp task