fix: fix hot-api for not build in bun app.mjs
This commit is contained in:
@@ -6,6 +6,7 @@ import fs from 'node:fs';
|
||||
// bun run src/index.ts --
|
||||
import { fileURLToPath } from 'node:url';
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const external = ['pm2', '@kevisual/hot-api'];
|
||||
/**
|
||||
*
|
||||
* @param {string} p
|
||||
@@ -20,11 +21,10 @@ await Bun.build({
|
||||
naming: {
|
||||
entry: 'assistant.js',
|
||||
},
|
||||
external: ['pm2'],
|
||||
external,
|
||||
define: {
|
||||
ENVISION_VERSION: JSON.stringify(pkg.version),
|
||||
},
|
||||
env: 'ENVISION_*',
|
||||
});
|
||||
|
||||
await Bun.build({
|
||||
@@ -38,8 +38,7 @@ await Bun.build({
|
||||
define: {
|
||||
ENVISION_VERSION: JSON.stringify(pkg.version),
|
||||
},
|
||||
external: ['pm2'],
|
||||
env: 'ENVISION_*',
|
||||
external,
|
||||
});
|
||||
// const copyDist = ['dist', 'bin'];
|
||||
const copyDist = ['dist'];
|
||||
|
||||
Reference in New Issue
Block a user