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

Vite build migration #304

Merged
merged 2 commits into from
Nov 23, 2024
Merged

Vite build migration #304

merged 2 commits into from
Nov 23, 2024

Conversation

shakiba
Copy link
Collaborator

@shakiba shakiba commented Nov 22, 2024

Key changes:

  • Build using vite (much faster and simpler), remove direct Rollup build
  • Manually add constructor factory types, remove ts transformer

Other changes:

  • Remove unused packages
  • Update typedoc packages, and update api docs
  • Add unminified umd build
  • Drop sourcemap for unminified build files

Notes:

  • This will be released as v1.1.*
  • Constructor factory types will be dropped from v2

Copy link

vercel bot commented Nov 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
planck-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 5:56pm

Copy link
Collaborator

@zOadT zOadT left a comment

Choose a reason for hiding this comment

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

Looks great! 🚀

Two small additional things I noticed:

  • "Drop sourcemap for unminified build files": I think there is actually still value in source maps for unminified files as we are still compiling from TS to JS (in es5) and additionally bundle the files into one. Personally I think I would prefer to still get errors regarding the TS files

  • From my understanding planck.js is now CJS and I think before it was UMD? Maybe that could lead to some confusion especially since the planck.min.js file is UMD. I think we can just keep planck.js UMD, I don't know if there really is much value in a pure CJS file nowadays?

tsconfig.json Outdated Show resolved Hide resolved
vite.config.mts Outdated Show resolved Hide resolved
@shakiba
Copy link
Collaborator Author

shakiba commented Nov 23, 2024

@zOadT Replaced cjs with umd, and added back sourcemap.

@zOadT zOadT self-requested a review November 23, 2024 09:19
@shakiba
Copy link
Collaborator Author

shakiba commented Nov 23, 2024

It seems linter doesn't work now, since we updated the typescript version.

Need to migrate eslint in another PR, which requires migrating to new config file format.

@shakiba shakiba merged commit e5048fe into master Nov 23, 2024
2 checks passed
@shakiba shakiba deleted the shakiba/vite-build branch December 14, 2024 15:17
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.

2 participants