node-fetch/build.js

19 lines
336 B
JavaScript

/**
* {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'
})
node-fetch的增强版, 增加注入及数据处理。
JavaScript 100%