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

yarn build-storybook generates declaration files in src #515

Closed
michael-land opened this issue Feb 23, 2020 · 3 comments
Closed

yarn build-storybook generates declaration files in src #515

michael-land opened this issue Feb 23, 2020 · 3 comments
Labels
problem: removed issue template OP removed the issue template without good cause scope: templates Related to an init template, not necessarily to core (but could influence core) solution: outdated This is not up-to-date with the current version

Comments

@michael-land
Copy link

michael-land commented Feb 23, 2020

yarn build-storebook will generate typescript declaration in src folder, is this expected behavior?

image

To reproduce:

  1. npx tsdx create test
  2. cd test
  3. yarn build-storebook
@agilgur5 agilgur5 changed the title [Question] yarn build-storebook always generate typescript declaration file in src [Question] yarn build-storybook always generate typescript declaration file in src Apr 8, 2020
@agilgur5
Copy link
Collaborator

agilgur5 commented Apr 8, 2020

Hi @xiaoyu-tamu , sorry this didn't get responded to earlier, I've gone through nearly every issue since I became a maintainer last month (c.f. #512 ), but this was one I missed over as it required investigation.

You removed the issue template (please don't do that, it's there for a reason), so I don't know what version of TSDX you were on.

I tried this on the latest TSDX v0.13+ and was unable to reproduce this.

v0.13 significantly upgraded the Storybook template (c.f. #435 ) and uses the new configuration available in Storybook 5.3+, which is quite different from the old one. I'm not sure if this problem exists in v0.12.3 or below, but it doesn't seem to exist in latest TSDX. I'd highly recommend upgrading to latest TSDX.

@agilgur5 agilgur5 closed this as completed Apr 8, 2020
@agilgur5 agilgur5 added solution: can't repro An attempt to reproduce has been tried and failed solution: outdated This is not up-to-date with the current version labels Apr 8, 2020
@agilgur5
Copy link
Collaborator

agilgur5 commented Apr 8, 2020

Ok, seems like this indeed occurs with v0.12.3 and no longer occurs with v0.13+, which changes the config. So this was fixed by #435 .
But that's somewhat of an incidental fix, it's because it sets transpileOnly to false, so it doesn't type-check at all. With type-checking one would want to set options: { compilerOptions: { declaration: false } } for ts-loader.

Thanks for reporting the error @xiaoyu-tamu and sorry there wasn't a maintainer to respond to this earlier.

@agilgur5 agilgur5 removed the solution: can't repro An attempt to reproduce has been tried and failed label Apr 8, 2020
@michael-land
Copy link
Author

michael-land commented Apr 8, 2020

Sorry about removed the issue template. Yeah, it works in v0.13.

@agilgur5 agilgur5 changed the title [Question] yarn build-storybook always generate typescript declaration file in src yarn build-storybook generates declaration files in src Apr 8, 2020
@agilgur5 agilgur5 added the problem: removed issue template OP removed the issue template without good cause label Apr 16, 2020
@agilgur5 agilgur5 added the scope: templates Related to an init template, not necessarily to core (but could influence core) label Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem: removed issue template OP removed the issue template without good cause scope: templates Related to an init template, not necessarily to core (but could influence core) solution: outdated This is not up-to-date with the current version
Projects
None yet
Development

No branches or pull requests

2 participants