Skip to content

typescript --allowJs too slow #7808

Closed
Closed
@viktor-nikolaev

Description

@viktor-nikolaev

TypeScript Version:

1.8.9

tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "module": "amd",
    "noEmitOnError": true,
    "allowJs": true
  },
  "exclude": [
    "node_modules",
    "bower_components"
  ]
}

gulp task

var  ts = require("gulp-typescript"),

var tsProject = ts.createProject("tsconfig.json", {
    noExternalResolve: true,
    typescript: require("typescript")
});

gulp.task("scripts", function() {
    return gulp.src(paths.devroot.ts)
        .pipe(ts(tsProject))
        .pipe(gulp.dest(paths.webroot.app));
});

gulp.task("watch", ["scripts"], function() {
    gulp.watch(paths.devroot.ts, ["scripts"]);
})

When I run the task with --allowJs set to true, it takes about 10seconds to build my project. Moreover it takes 10 seconds after any change in my files, ie it is not incrementaly.

When --allowJs is disabled, it takes about 1 second to build the whole project, and 100ms to build incrementally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions