A smart bundler for libraries
- works well with monorepos
- minimal to no config
- lots of build time optimistions
- uses rollup under the hood
- opinionated
THIS IS NOT READY, THIS IS JUST WHAT IT SHOULD LOOK LIKE IN THE FUTURE
yarn add --dev preconstruct
preconstruct init
- Setup package.json with
"main"
and"module"
- Setup packages if in monorepo
- probably ask other things
preconstruct build
- verifies things
- if
typeof document
ortypeof window
is used, prompt to add browser field
- if
- does the build
preconstruct watch
- same as build but watches
preconstruct fix
- like init but infers as much as possible
- made for places that already have build setups
- e.g. if the package has a umd:main field and it's wrong, fix it and ask for a umdName but if it doesn't hava umd:main field, don't do anything
- good, reliable caching
- use users babel config
- allow for other entrypoints, automatically generate folders with package.json
- opinionated dist folder structure with verification if it's wrong
- microbundle was a huge inspiration for this! ❤️
- rollup
- bolt - lots of utils and things in this project were inspired by things in bolt
- all the people who wrote all the dependencies for this project!