Browse Source
- Updated package.json to improve build scripts with production environment settings. - Added new bundling command for executable output. - Enhanced tsup configuration with tree-shaking and environment variable definitions. - Simplified environment checks in various modules to directly use process.env.NODE_ENV. - Updated component type definitions to include new UI components from maz-ui.mono
10 changed files with 38 additions and 17 deletions
@ -0,0 +1,16 @@ |
|||
# bun 编译配置:将 dist 下的所有资源一并内嵌到可执行文件中 |
|||
# 注意:命令行中的 --compile/--outfile 参数依然可以覆盖这里的设置 |
|||
|
|||
[compile] |
|||
# 入口文件(与 package.json 的 bundle:exe 一致) |
|||
entrypoint = "dist/booststap.js" |
|||
|
|||
# 需要内嵌到可执行文件中的静态资源(包含服务端/客户端产物) |
|||
assets = [ |
|||
"dist/**" |
|||
] |
|||
|
|||
# 输出可执行文件路径 |
|||
outfile = "dist/koa-ssr.exe" |
|||
|
|||
|
|||
@ -1,11 +1,9 @@ |
|||
|
|||
const isProduction = process.env.NODE_ENV === 'production' |
|||
const port = process.env.PORT || 5173 |
|||
const base = process.env.BASE || '/' |
|||
|
|||
|
|||
export const Env = { |
|||
isProduction, |
|||
port: Number(port), |
|||
base |
|||
} |
|||
Loading…
Reference in new issue