weixin_39769807 2020-11-20 15:40
浏览 0

sourcemap:true, ??? sourcemaps.write()

which codes snippet should I use ?

sourcemap:true,


gulp.task('typescript-options', function() {
    gulp.src('./TypeScript/**/*.ts')
        .pipe(tsc({
            sourcemap:true,
            target:'ES5'
        }))
        .pipe(gulp.dest('./build/TypeScript'));
});

sourcemaps.write()


gulp.task('typescript-options', function() {
    gulp.src('./TypeScript/**/*.ts')
        .pipe(tsc({
            sourcemaps.write(),
            target:'ES5'
        }))
        .pipe(gulp.dest('./build/TypeScript'));
});

https://github.com/ivogabe/gulp-typescript

https://github.com/floridoo/gulp-sourcemaps

该提问来源于开源项目:ivogabe/gulp-typescript

  • 写回答

6条回答 默认 最新

  • weixin_39769807 2020-11-20 15:40
    关注

    https://www.typescriptlang.org/docs/handbook/compiler-options.html

    
    --sourceMap boolean false   Generates corresponding .map file.
    
    评论

报告相同问题?