leopardslab / leopardslab/react-email
[Build] Improve the build process and size with TypeScript
Open
Nobody has claimed this yet.
enhancement
help wanted
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Description:
- The current build process has so many faults which can be improved.
- We need to find some techniques and ways to improve the overall build process and size
Reference:
The few points on which we need to work on:
-
Build Size
- The current build and bundling process has some issues which can be improved. Right now, we are generating TypeScript types for both the
esmandcjsversions separately, which are basically both identical. So instead of generating thetypesseparately, we can put it into one single folder and map the directory in thepackage.json.
- The current build and bundling process has some issues which can be improved. Right now, we are generating TypeScript types for both the
-
Minify and splitting the Output
- The build output currently isn't in the minified format. We can minify that to reduce the actual package size. We can also use code splitting while building our package. We can use some modern bundler and build tool for this process (example: esbuild, tsup, tsdx)
Outcome:
- Optimizations and improvements of the package compared to the previous version.
CC @agentmilindu
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with package.json and inspect how the esm and cjs builds currently generate duplicate TypeScript types. Compare the existing output size and structure, then evaluate minification and code splitting with the referenced esbuild, tsup, or tsdx approaches; done means a smaller, optimized package with one shared types directory mapped in package.json.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100