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

fix: build with vite #384

Merged
merged 4 commits into from
Jan 25, 2024
Merged

fix: build with vite #384

merged 4 commits into from
Jan 25, 2024

Conversation

spaenleh
Copy link
Member

@spaenleh spaenleh commented Jan 24, 2024

In this PR I:

  • setup the build process to use vite library mode

This has multiple advantages:

  • it creates 2 bundles:
    • 1 ESM
    • 1 CommonJS
  • but the package can be an ESM package
  • it allows us to decide which dependencies we want to bundle and which ones we want to externalise (added in the rollupOptions) so the consumer can provide theirs.
  • we already use vitest for tests (mhmmm so fast) so why bother with a different build pipeline

This change involved changing a bit the tsconfigs etc.
Please ask any questions where you have doubts or are curious of some settings.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@spaenleh spaenleh self-assigned this Jan 24, 2024
@spaenleh spaenleh added the build Build and developer operations label Jan 24, 2024
Copy link
Contributor

@ReidyT ReidyT left a comment

Choose a reason for hiding this comment

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

LGTM, nice job 🙌

@spaenleh spaenleh merged commit 06e9965 into main Jan 25, 2024
3 checks passed
@spaenleh spaenleh deleted the build-with-vite branch January 29, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build and developer operations v3.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants