15 lines
331 B
JavaScript
15 lines
331 B
JavaScript
const esbuild = require('esbuild')
|
|
const { version } = require('./package.json')
|
|
|
|
esbuild.build({
|
|
entryPoints: ['src/index.js'],
|
|
sourcemap: false,
|
|
bundle: true,
|
|
define: { 'process.env.APP_VERSION': `'${version}'` },
|
|
platform: 'node',
|
|
target: 'node10',
|
|
minify: true,
|
|
// external: ['chalk'],
|
|
outfile: 'index.js'
|
|
})
|