Gulp and TS compilation

前端 未结 1 1637
醉梦人生
醉梦人生 2021-01-28 08:45

I have defined task in my gulp file:

gulp.task(\'dev:build:scripts\', function () {
    var tsResult = tsProject.src()
        .pipe(sourcemaps.init())
        .         


        
相关标签:
1条回答
  • 2021-01-28 09:02

    I think you forgot to actually write your results. Try this one:

    gulp.task('dev:build:scripts', () => 
    {
        var tsProject = ts.createProject('tsconfig.json');
    
        var tsResult = tsProject.src()
            .pipe(sourcemaps.init())   
            .pipe(ts(tsProject));  
    
        return tsResult.js.pipe(sourcemaps.write()).pipe(gulp.dest(paths.dist +'/app'));        
    });    
    
    0 讨论(0)
提交回复
热议问题