27 lines
539 B
JavaScript
27 lines
539 B
JavaScript
|
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();
|