Skip to content

Conversation

@phated
Copy link
Contributor

@phated phated commented Jan 23, 2021

Issue: #11220

What I did

I split out the additional excludes from #11220 into a separate commit. One question that @shilman had was whether or not we could put these in the root config that the packages extend from instead of duplicating all the boilerplate.

How to test

  • Is this testable with Jest or Chromatic screenshots? ❌
  • Does this need a new example in the kitchen sink apps? ❌
  • Does this need an update to the documentation? ❌

If your answer is yes to any of these, please make sure to include it in your PR.

Copy link
Member

@gaetanmaisse gaetanmaisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question that @shilman had was whether or not we could put these in the root config that the packages extend from instead of duplicating all the boilerplate.

Yes definitely, I would suggest to set up a clean exclude property in the root tsconfig.json and then remove exclude in all sub tsconfig.

@phated
Copy link
Contributor Author

phated commented Jan 28, 2021

@gaetanmaisse how does the exclude work in relation to the the working directory (if being used in extends)?

@phated
Copy link
Contributor Author

phated commented Jan 28, 2021

@gaetanmaisse it looks like it is relative to the file you are importing, so we can't put them at the top level without using a very liberal glob (which would cause us to lose all the performance gains).

From https://www.typescriptlang.org/tsconfig#extends

All relative paths found in the configuration file will be resolved relative to the configuration file they originated in.

@shilman Given that limitation, are you okay merging this?

@phated phated added the run e2e extended test suite Run the e2e extended test suite in CircleCI workflows label Feb 2, 2021
@gaetanmaisse gaetanmaisse changed the title Build: exclude more files from transpilation Build: Exclude all test and story files from transpilation Feb 3, 2021
@gaetanmaisse gaetanmaisse merged commit b4f30f6 into storybookjs:next Feb 3, 2021
@phated phated deleted the phated/ts-exclude-tests branch February 4, 2021 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance User-facing maintenance tasks run e2e extended test suite Run the e2e extended test suite in CircleCI workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants