diff --git a/gulpfile.ts b/gulpfile.ts index aa67129149..df7f7e3292 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -8,6 +8,7 @@ import * as Path from 'path'; import * as gulp from 'gulp'; import * as gutil from 'gulp-util'; import * as ts from 'gulp-typescript'; +const sourcemaps = require('gulp-sourcemaps'); import tslint from 'gulp-tslint'; import cssnano = require('gulp-cssnano'); import * as uglifyComposer from 'gulp-uglify/composer'; @@ -60,7 +61,9 @@ gulp.task('build:ts', () => { return tsProject .src() + .pipe(sourcemaps.init()) .pipe(tsProject()) + .pipe(sourcemaps.write('.', { includeContent: false, sourceRoot: '../built' })) .pipe(gulp.dest('./built/')); }); diff --git a/package.json b/package.json index 34870a6eb6..b4674c2463 100644 --- a/package.json +++ b/package.json @@ -121,6 +121,7 @@ "gulp-pug": "3.3.0", "gulp-rename": "1.2.2", "gulp-replace": "0.6.1", + "gulp-sourcemaps": "^2.6.4", "gulp-stylus": "2.7.0", "gulp-tslint": "8.1.3", "gulp-typescript": "3.2.4", diff --git a/tsconfig.json b/tsconfig.json index 9d26429c51..47aa521bfe 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "noUnusedLocals": true, "noFallthroughCasesInSwitch": true, "declaration": false, - "sourceMap": false, + "sourceMap": true, "target": "es2017", "module": "commonjs", "removeComments": false,