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

Replace parcel with tsup. Better types, better tsconfig. Move to ESM. #6467

Merged
merged 5 commits into from
Nov 4, 2024

Conversation

sneridagh
Copy link
Member

No description provided.

Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 4aee66c
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/672939d63eacbe0007a8673f

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

@sneridagh What does adding type in the imports do?

@sneridagh
Copy link
Member Author

@davisagli type declares the import "Typescript only", so the interpreter knows that it does not belong to the code, so it strips it on build time when transpiling. It's a best practice nowadays. This is enforced by the tsconfig option "verbatimModuleSyntax".

I'm trying to come up with a golden tsconfig for all our browser libs, then one for the Node ones. I think we are near.

@davisagli
Copy link
Member

@sneridagh So the type system can't even tell which things are types without giving manual hints? Pssh.

@sneridagh
Copy link
Member Author

@davisagli it can, but sometimes it seems it has a hard time doing it, so it's better to explicit tell him :) It kind of makes sense in a bundler world!

@sneridagh sneridagh merged commit bb03e8f into main Nov 4, 2024
65 of 66 checks passed
@sneridagh sneridagh deleted the replaceparcelwithtsupcomponents branch November 4, 2024 21:30
sneridagh added a commit that referenced this pull request Nov 4, 2024
* main:
  Replace `parcel` with `tsup`. Better types, better tsconfig. Move to ESM. (#6467)
  [client] Replace `parcel` with `tsup` (#6466)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants