node-fetch/build.js

19 lines
336 B
JavaScript
Raw Permalink Normal View History

2023-01-13 18:28:04 +08:00
/**
* {build}
* @author yutent<yutent.io@gmail.com>
* @date 2021/08/09 11:59:41
*/
import Es from 'esbuild'
const mode = process.argv.slice(2).shift()
Es.build({
entryPoints: ['src/index.js'],
bundle: true,
watch: mode === 'dev' ? true : false,
minify: mode === 'dev' ? false : true,
format: 'esm',
outdir: 'dist'
})