-
Notifications
You must be signed in to change notification settings - Fork 11
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
chore(styleguide): use 'tsup' instead of 'tsc' to compile styleguide #840
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay, nice! Not sure why this would be less responsive than running tsc
in dev mode, even if the import pointed to ts files.
The reason why it pointed to ts files was because we had the SG in transpilePackages
. If we want to go through tsup anyway, then we should remove that as well.
Another thing I noticed: editor integration is broken now, Intellisense will point to the minified chunk file in dist/ |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
cc94c84
to
cf6922b
Compare
cf6922b
to
fb85216
Compare
For the minify option, this looks like a nicer approach than checking for NODE_ENV:
|
Also, styleguide is still in next.config.js |
…is not being run in watch-mode
@jstcki seems to work fine with minifiy and clean being set to |
This PR bundles the styleguide with
tsup
rather thantsc
.We bundle the code both as CJS and ESM to allow using it in our frontends, as well as the API.
Since the exports in key in the styleguides package.json now points to the bundled ESM rather than the
ts
files within the src directly (which was wrong to begin with 🙄), running styleguide + in parallel in dev-mode might feel less responsive (not that it was fast up until now 😛)