mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-10 17:38:51 +00:00
using nostr-tools with a facade.
This commit is contained in:
24
build.js
24
build.js
@@ -1,7 +1,23 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
require('esbuild').buildSync({
|
||||
entryPoints: ['globals.js'],
|
||||
outfile: 'globals.bundle.js',
|
||||
bundle: true
|
||||
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.'))
|
||||
|
||||
Reference in New Issue
Block a user