Skip to content

Update rolldown, adopt rolldown-plugin-dts #3787

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

Merged
merged 6 commits into from
May 19, 2025
Merged

Update rolldown, adopt rolldown-plugin-dts #3787

merged 6 commits into from
May 19, 2025

Conversation

nstepien
Copy link
Contributor

@nstepien nstepien commented May 19, 2025

  • Updated rolldown
    • https://github.com/rolldown/rolldown/blob/main/CHANGELOG.md
    • Updated the rolldown config
      • js -> ts
      • removed output.entryFileNames
        • Had to change to a function to properly output the .d.ts file
        • It was simpler to just remove it, use the defaults, and update the paths in package.json instead.
      • removed external
        • Not sure if it was still needed before, but it seems to work fine now without it
  • Replaced api-extractor with rolldown-plugin-dts, simplifying/speeding up the build process

@nstepien nstepien self-assigned this May 19, 2025
@nstepien nstepien marked this pull request as ready for review May 19, 2025 17:07
@nstepien nstepien requested a review from amanmahajan7 as a code owner May 19, 2025 17:07
Comment on lines +23 to +25
"browser": "./lib/index.js",
"main": "./lib/index.js",
"module": "./lib/index.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need all three?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not at this point, it's just there for older bundlers, but we could try removing those.

@@ -65,7 +65,7 @@ export default defineConfig(({ command }) => ({
exclude: ['./.cache/**/*']
}),
wyw({
exclude: ['./.cache/**/*'],
exclude: ['./.cache/**/*', '**/*.d.ts', '**/*.gen.ts'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we not need to excluded '**/*.d.ts', '**/*.gen.ts' in rolldown.config?

Copy link
Contributor Author

@nstepien nstepien May 19, 2025

Choose a reason for hiding this comment

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

I did add '**/*.d.ts', as otherwise the build fails with the new plugin.
'**/*.gen.ts' is probably not needed as rolldown won't touch the website files.

@nstepien nstepien merged commit 720a253 into main May 19, 2025
2 checks passed
@nstepien nstepien deleted the rolldownts branch May 19, 2025 17:24
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