mirror of
https://github.com/fiatjaf/nak.git
synced 2024-10-30 00:59:07 -04:00
24 lines
527 B
JavaScript
Executable File
24 lines
527 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const esbuild = require('esbuild')
|
|
const alias = require('esbuild-plugin-alias')
|
|
const nodeGlobals = require('@esbuild-plugins/node-globals-polyfill').default
|
|
|
|
esbuild
|
|
.build({
|
|
entryPoints: ['globals.js'],
|
|
outfile: 'globals.bundle.js',
|
|
bundle: true,
|
|
plugins: [
|
|
alias({
|
|
stream: require.resolve('readable-stream')
|
|
}),
|
|
nodeGlobals({buffer: true})
|
|
],
|
|
define: {
|
|
window: 'self',
|
|
global: 'self'
|
|
}
|
|
})
|
|
.then(() => console.log('build success.'))
|