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

build: use rollup-plugin-dts #14571

Merged
merged 5 commits into from
Oct 11, 2023
Merged

build: use rollup-plugin-dts #14571

merged 5 commits into from
Oct 11, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Oct 10, 2023

Description

Use rollup-plugin-dts instead of @microsoft/api-extractor

Benefits:

  1. No need to export internal types just to get api-extractor to bundle, which the internal props that relied on the internal types are stripped, but the internal types were still exported anyways
  2. Faster builds
  3. Lesser code
  4. More type bundling control

Additional context

Original code referenced from https://github.com/vuejs/core/blob/main/rollup.dts.config.js

I'm not really sure why they use the renderChunk hook, I used the transform hook instead to strip the @internal types


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@bluwy bluwy added the p1-chore Doesn't change code behavior (priority) label Oct 10, 2023
@sapphi-red
Copy link
Member

Nice! I've been thinking about using rollup-plugin-dts for a long time.

rollup-plugin-dts seems to support compilerOptions.stripInternal. Did you try settings this?
Swatinem/rollup-plugin-dts#2

@bluwy
Copy link
Member Author

bluwy commented Oct 10, 2023

Wowzers that works! So much cleaner now

@bluwy bluwy merged commit d89725b into main Oct 11, 2023
10 checks passed
@bluwy bluwy deleted the rollup-plugin-dts branch October 11, 2023 07:01
@bluwy bluwy mentioned this pull request Oct 11, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants