Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Remove createTsDec #459

Closed
wants to merge 12 commits into from
Closed

Conversation

liywjl
Copy link
Contributor

@liywjl liywjl commented Mar 1, 2021

What does this change?

  • remove yarn createTsDec command
  • yarn build uses yarn tsc instead of yarn createTsDec
  • Move yarn createTsDec options to tsconfig.json
  • Set emitDeclarationOnly true option to both yarn tsc and rollup to generate types
  • Ignore test and stories when building using TS

Why?

yarn createTsDec was running yarn tsc with a bunch of custom options. It makes more sense for those options to be in tsconfig.json. It also fixes the issue where we were compiling xx.test.tsx files on pre-push which would in turn be picked up by Jest

Why not set emitDeclarationOnly true in tsconfig?

Storybook seems to be using tsconfig and if we set emitDeclarationOnly to true, it has issues building. Instead we set it in Rollup and yarn tsc

@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2021

Size Change: -167 kB (-78%) 🏆

Total Size: 45.9 kB

Filename Size Change
build/App.esm.js 22.8 kB -83.3 kB (-79%) 🏆
build/App.js 23.1 kB -83.6 kB (-78%) 🏆

compressed-size-action

package.json Show resolved Hide resolved
@liywjl liywjl requested a review from gtrufitt March 3, 2021 12:57
@liywjl
Copy link
Contributor Author

liywjl commented Mar 8, 2021

will need to test this on a pre-release, as it looking like it might not be bundling all components

@mxdvl
Copy link
Contributor

mxdvl commented Oct 24, 2022

If we use Vite in #609, we can achieve the same thing with vite-plugin-dts

@mxdvl mxdvl closed this Oct 24, 2022
@mxdvl mxdvl deleted the william/remove-yarn-createTsDec-to-tsc branch October 24, 2022 17:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants