Splits vectors and intersections into new packages
esbuild isn't currently tree shaking intersections, but that's a file where we could save some room
This commit is contained in:
parent
6e97d67f0d
commit
7f0cfd2c5a
58 changed files with 1801 additions and 880 deletions
27
packages/vec/scripts/pre-dev.js
Normal file
27
packages/vec/scripts/pre-dev.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* eslint-disable */
|
||||
const fs = require('fs')
|
||||
const esbuild = require('esbuild')
|
||||
|
||||
async function main() {
|
||||
if (fs.existsSync('./dist')) {
|
||||
fs.rmSync('./dist', { recursive: true }, (e) => {
|
||||
if (e) {
|
||||
throw e
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
esbuild.build({
|
||||
entryPoints: ['./src/index.ts'],
|
||||
outdir: 'dist/cjs',
|
||||
minify: true,
|
||||
bundle: true,
|
||||
sourcemap: true,
|
||||
format: 'cjs',
|
||||
target: 'es6',
|
||||
tsconfig: './tsconfig.json',
|
||||
external: ['react', 'react-dom'],
|
||||
})
|
||||
}
|
||||
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue