Microbundle to tsdown migration#886
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR migrates the project’s bundling workflow from microbundle to tsdown, updates package entrypoints accordingly, and refreshes the generated dist/ outputs.
Changes:
- Add
tsdownbuild configurations for ESM + UMD builds and a separate npm-focused ESM build. - Update
package.jsonscripts/entrypoints to usetsdownand removemicrobundle. - Update TypeScript compiler settings and regenerate
dist/artifacts.
Reviewed changes
Copilot reviewed 3 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tsdown.config.ts | Adds tsdown config for ESM + UMD builds, including dependency bundling rules. |
| tsdown.config.npm.ts | Adds a separate tsdown config for npm publishing (ESM only). |
| tsconfig.json | Enables skipLibCheck while keeping ESNext/Bundler settings. |
| package.json | Switches build scripts to tsdown, updates exports/module fields, and updates dev dependencies. |
| dist/route.umd.js | Updates the generated UMD bundle output. |
| dist/index.js | Updates the generated ESM bundle output. |
| dist/index.esm.js | Removes the previously generated ESM build file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks! Why was I removed a bunch of options that were set to their default values, and added back a shim Going to continue testing. |
|
@bakerkretzmar See the section about "Conditional exports" in the link below |
This PR implements tsdown to address the vulnerability warnings associated with microbundler.
Functionally, it is the same as microbundler in how it bundles the files.
Long term, it will also allow for the current vanilla JS source files to be TypeScript and have tsdown convert to vanilla JS and generate .d.ts files automatically. That would remove the need for this command to exist
ziggy:generate --typesas types would be picked up automatically.Thank you for your consideration 😄