Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsconfig extends support #467

Closed
Peter-Juhasz opened this issue Dec 8, 2016 · 1 comment
Closed

tsconfig extends support #467

Peter-Juhasz opened this issue Dec 8, 2016 · 1 comment

Comments

@Peter-Juhasz
Copy link

TypeScript: 2.1.4
Version: 3.1.3

Expected behavior:
Applies inheritance and interpolates the tsconfig file references in the extends attribute.

Running tsc works as expected.

Actual behavior:
createProject does not support tsconfig inheritance, it passes only the tsconfig which references another one without interpolating the base config file.

Even if I change extends to a file which does not even exists, there is no error, just different compiler options than set in the base tsconfig.

gulpfile.js

var tsBuildProject = typescript.createProject("tsconfig.build.json");
gulp.task("app:scripts:ts:build", function () {
    return tsBuildProject.src()
        .pipe(sourcemaps.init())
        .pipe(tsBuildProject()).js
        .pipe(ngAnnotate())
        .pipe(concat(paths.concatAppJsDest))
        .pipe(uglify())
        .pipe(sourcemaps.write("."))
        .pipe(gulp.dest("."));
});

tsconfig.json

{
    "compileOnSave": false,
    "compilerOptions": {
        "target": "ES5"
    }
    ...
}

tsconfig.build.json

{
    "extends": "./tsconfig",
    ...
}
@ivogabe
Copy link
Owner

ivogabe commented Dec 11, 2016

Duplicate of #459

@ivogabe ivogabe closed this as completed Dec 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants