Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshuaellis/package-test-ground
For testing your ESM & CJS package exports
https://github.com/joshuaellis/package-test-ground
Last synced: about 2 months ago
JSON representation
For testing your ESM & CJS package exports
- Host: GitHub
- URL: https://github.com/joshuaellis/package-test-ground
- Owner: joshuaellis
- Created: 2023-02-25T13:31:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-25T15:22:13.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T20:41:14.985Z (3 months ago)
- Language: CSS
- Size: 94.4 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
Package Test Ground
A repo for testing packages that export CJS & ESM modules in a variety of build configurations
## Background
ESM & CJS is _confusing_ to say the least. You have to cater for the entire ecosystem that all seem to have a different interpretation of what to do to support it and then to top it all off you have older bundlers that maybe can't handle what you're expecting them too.
I release `9.7.0` of `react-spring` and it turns out I broke many apps using `webpack@4` and `create-react-app`. So to avoid that, I set up this small repo template with what I believe to be the "big" bundlers:
* CRA
* NextJS
* Vite
* Webpack 4## Commands
The repo is mono using [`turborepo`](https://turbo.build/repo).
### `clean`
Removes all `node_modules` & build directories from each package leaving it in a "fresh" state.
### `workspace:add `
This adds a package to all the workspaces independently using a shell script underneath.