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

Use swc instead of typescript plugin #8

Merged
merged 4 commits into from
Feb 10, 2024

Conversation

blbu
Copy link
Contributor

@blbu blbu commented Jan 14, 2024

We can get faster builds by using a rollup plugin which wraps swc Speedy Web Compiler.

There is a relatively official plugin at @rollup/plugin-swc but I had difficulty implementing bundling to a single output file.

As a starting point, there is rollup-plugin-swc3 which seems to "do the right thing" with relatively little configuration effort.

The overall change in rollup.config.mjs is small, so worth checking out and trying to build some larger codebases with it.

@admon84
Copy link
Owner

admon84 commented Feb 10, 2024

Thanks for your contribution! I updated your branch with a few small revisions but overall I like the faster builds with swc and the output looks good.

One change I made was revising the rollup config to work around this bug when a relative path is used for baseUrl SukkaW/rollup-plugin-swc#63

@admon84 admon84 merged commit fe3a352 into admon84:main Feb 10, 2024
1 check passed
admon84 added a commit that referenced this pull request Feb 10, 2024
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.

None yet

2 participants