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

Sourcemap always on in .d.ts files. #596

Closed
StaticSaltByte opened this issue Sep 29, 2018 · 0 comments
Closed

Sourcemap always on in .d.ts files. #596

StaticSaltByte opened this issue Sep 29, 2018 · 0 comments

Comments

@StaticSaltByte
Copy link

Expected behavior:
Setting sourceMap: false when using ts.createProject('tsconfig.json') or ts.createProject({ ... }) should prevent sourcemaps from being added to generated .d.ts files.

Actual behavior:
Changing the sourceMap value does not appear to have any effect. Adding the configuration to tsconfig.json or passing it as an option when calling ts.createProject() did not have any obvious effect.

Gulpfile excerpt:

// Used for producing Javascript
const tsProject = ts.createProject('tsconfig.json', {
	typescript: typescript,
});

// Used for producing .d.ts files
const tsProject2 = ts.createProject('tsconfig.json', {
    typescript: typescript,
	removeComments: true,
	declaration: true,
	sourceMap: false,
	module: 'none'
});

Aditional info:
This bug appeared after upgrading to gulp-typescript 5.0.0-alpha.3 from a much older version. Downgrading to 4.0.2 fixed the problem.

Finally, I was using TypeScript 3.1.1 for all versions of gulp-typescript and all other project dependencies were also consistent throughout the upgrade process.

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

1 participant