mirror of
https://github.com/logos-storage/logos-storage-js.git
synced 2026-01-06 23:43:09 +00:00
19 lines
416 B
JavaScript
19 lines
416 B
JavaScript
|
|
const { build } = require('esbuild')
|
||
|
|
const define = {}
|
||
|
|
|
||
|
|
for (const k in process.env) {
|
||
|
|
define[`process.env.${k}`] = JSON.stringify(process.env[k])
|
||
|
|
}
|
||
|
|
|
||
|
|
if(!process.env["CODEX_NODE_URL"]) {
|
||
|
|
define[`process.env.CODEX_NODE_URL`] = "\"http://localhost:8080\""
|
||
|
|
}
|
||
|
|
|
||
|
|
const options = {
|
||
|
|
entryPoints: ['./index.js'],
|
||
|
|
outfile: './index.bundle.js',
|
||
|
|
bundle: true,
|
||
|
|
define,
|
||
|
|
}
|
||
|
|
|
||
|
|
build(options).catch(() => process.exit(1))
|