Bitburner-Scripts/build.mjs

27 lines
539 B
JavaScript
Raw Normal View History

import { context } from 'esbuild';
import { BitburnerPlugin } from 'esbuild-bitburner-plugin';
const createContext = async () => await context({
entryPoints: [
'servers/**/*.js',
'servers/**/*.jsx',
'servers/**/*.ts',
'servers/**/*.tsx',
],
outbase: "./servers",
outdir: "./dist",
plugins: [
BitburnerPlugin({
port: 12525,
types: 'NetscriptDefinitions.d.ts'
})
],
bundle: true,
format: 'esm',
platform: 'browser',
logLevel: 'info'
});
let ctx = await createContext();
ctx.watch();