Skip to content

Conversation

Mastercuber
Copy link
Contributor

@Mastercuber Mastercuber commented Mar 24, 2024

To improve the build process a bit, I installed vite, add a npm build script and a configuration file for vite.

When executing npm run build vite will build a cjs, es and iife version of the package and additionally a type declarations file is generated.

All this files are referenced in the package.json for package usage.

This PR is based on #8 !

@Mastercuber Mastercuber force-pushed the build branch 2 times, most recently from e60e5c4 to a217fc0 Compare March 25, 2024 01:05
@thatcomputerguy0101
Copy link
Contributor

This is likely useful for my need as well, since the current CJS-only build target can't be used from a web browser easily. An alternative solution with less code change would be to use the UMD target format instead in the current tsconfig.json file, but that still doesn't support ESM, unlike this PR.

@thatcomputerguy0101
Copy link
Contributor

I realized that I also have an older fork that covers this same issue in a different fashion, which I'll be creating a PR for soon once I finish some incomplete changes on it.

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