es.shim/build.js

26 lines
411 B
JavaScript

/**
* {build}
* @author yutent<yutent.io@gmail.com>
* @date 2021/08/09 11:59:41
*/
const Es = require('esbuild')
Es.build({
entryPoints: ['src/index.mjs'],
outfile: 'dist/index.mjs',
platform: 'node',
bundle: true,
minify: true,
format: 'esm'
})
Es.build({
entryPoints: ['src/index.mjs'],
outfile: 'dist/index.js',
platform: 'node',
minify: true,
bundle: true,
target: 'node8'
})
实现部分新API, 以及一些常用的扩展方法。 nodejs和浏览器通用,
JavaScript 100%