tex-math-parser icon indicating copy to clipboard operation
tex-math-parser copied to clipboard

build process improvements

Open Mastercuber opened this issue 1 year ago • 2 comments

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 avatar Mar 24 '24 23:03 Mastercuber

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 avatar Jun 15 '24 00:06 thatcomputerguy0101

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.

thatcomputerguy0101 avatar Jun 15 '24 03:06 thatcomputerguy0101