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

cannot overide declaration option -- missing compilerOptions #257

Closed
Mister-Hope opened this issue Jan 7, 2021 · 2 comments
Closed

cannot overide declaration option -- missing compilerOptions #257

Mister-Hope opened this issue Jan 7, 2021 · 2 comments
Labels
kind: support Asking for support with something or a specific use case solution: invalid This doesn't seem right

Comments

@Mister-Hope
Copy link

Mister-Hope commented Jan 7, 2021

What happens and why it is wrong

I am setting declaration: true in my tsconfig. And I add

typescript2({
  tsconfigOverride: {
    declaration: false,
  },
}),

in the plugin config. I am expecting the types are no longer generated, but the types still generates.

It seems that the d.ts is generated by tsc, and I think the plugin should checked if the user still wants to generate types before simply calling tsc to generate types.

Env:
All the plugins are in it's latest version.

Addtional Info:

After I set declaration: false in tsconfig.json, the types are no longer generated

Why I need this:
I am using it along with Vue, and I met issue #224.

Also I have several input files, and the tsconfig is containing the whole project, and I got the whole project's declaration files because of issue #211.

So I am going to generate declaration files by my self, while I need the declaration: true in tsconfig.json.

@ezolenko
Copy link
Owner

ezolenko commented Jan 20, 2021

I think you are missing compilerOptions object in override:

typescript2({
  tsconfigOverride: {
    compilerOptions: {
      declaration: false,
    },
  },
}),

@Mister-Hope
Copy link
Author

Thanks, my fault🌚

@agilgur5 agilgur5 changed the title Bug: cannot overide declaration option cannot overide declaration option -- missing compilerOptions Apr 24, 2022
@agilgur5 agilgur5 added the kind: support Asking for support with something or a specific use case label Apr 24, 2022
Repository owner locked as resolved and limited conversation to collaborators Apr 24, 2022
@agilgur5 agilgur5 added the solution: invalid This doesn't seem right label May 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind: support Asking for support with something or a specific use case solution: invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants