-
Notifications
You must be signed in to change notification settings - Fork 61
Ignore declaration
setting in tsconfig.json
#45
Comments
@jvilk I'm not familiar enough with |
@Victorystick When These declaration files can only be produced with a normal compilation of the entire program, since they reference each other to import types from other modules. Thus, the I think it makes sense to force the option to |
Released as version 0.7.6. |
This was a terrible Idea. I have a use case where I do want the d.ts file to be spit out. |
@austbot but it never worked. It just failed. The fix prevents it from outright failing. |
I see, sorry for the stark comment. Could this be revisited, surly if you can emit a source map we can emit d.ts files? We could even bundle them in this plugin. Was the error with typescript or a problem with rollup not liking multiple outputs for the bundle? @jvilk |
@austbot If you are using modules, which you must be in order to use Rollup, TypeScript produces a To support this use case, Rollup would need to:
It seems cumbersome to support this, especially since this plugin has many serious deficiencies documented in other issues. I'd recommend not using this plugin. Instead, invoke the TypeScript compiler first to produce individual modules. Then, run rollup on those. That way, you get your declaration files, and sidestep the many other issues documented in this repository. |
I would but type script has an issue with trying to import html and scss |
Is there a way to ignore files, ie I don't want d.ts files for my component.spec.ts files? |
I have
declaration
set totrue
in mytsconfig.json
file so I can generate and distribute typings with my library for others consuming the individual modules. (I invoke the TypeScript compiler separately to produce the typings; it wouldn't make sense forrollup-plugin-typescript
to generate them for me.)The TypeScript plugins for Browserify and Webpack seem to ignore this setting, but
rollup-plugin-typescript
passes it to the TypeScript compiler, resulting in the following error message:After Googling a bit, it appears that this is a limitation of the TypeScript compiler's
transpileModule
method. Overriding thedeclaration
field tofalse
fixes the problem.I think it would be great if you chose to do one of the following things:
declaration
setting, as it does not appear to be applicable. (But maybe I'm missing a scenario where it would be?), or...declaration
is set totrue
.The text was updated successfully, but these errors were encountered: