mirror of
https://github.com/2234839/web-font.git
synced 2026-05-27 10:58:10 +08:00
fix build
This commit is contained in:
parent
76ac23ad5d
commit
7c7db7447a
@ -105,7 +105,7 @@ function runTsdown() {
|
|||||||
/** 使用 LLRT compile 生成 .lrt 文件 */
|
/** 使用 LLRT compile 生成 .lrt 文件 */
|
||||||
function runLlrtCompile() {
|
function runLlrtCompile() {
|
||||||
console.log("\n--- Running LLRT compile ---");
|
console.log("\n--- Running LLRT compile ---");
|
||||||
execSync(`${LLRT_BIN} compile ./dist_backend/backend/app.cjs ./dist_backend/app.lrt`, {
|
execSync(`${LLRT_BIN} compile ./dist_backend/app.cjs ./dist_backend/app.lrt`, {
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
cwd: ROOT_DIR,
|
cwd: ROOT_DIR,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,13 +1,29 @@
|
|||||||
import { defineConfig } from "tsdown";
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
export default defineConfig({
|
const shared = {
|
||||||
entry: ["backend/app.ts", "基准测试_llrt.ts"],
|
|
||||||
format: ["cjs"],
|
format: ["cjs"],
|
||||||
clean: true,
|
clean: true,
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
outDir: "dist_backend",
|
outDir: "dist_backend",
|
||||||
|
outputOptions: {
|
||||||
|
/** 禁用代码拆分,确保单文件输出(tsdown 默认会拆分大依赖为 chunk) */
|
||||||
|
codeSplitting: false,
|
||||||
|
},
|
||||||
deps: {
|
deps: {
|
||||||
/** 所有依赖都打进 bundle(LLRT scratch 镜像无 node_modules) */
|
/** 所有依赖都打进 bundle(LLRT scratch 镜像无 node_modules) */
|
||||||
alwaysBundle: [/.*/],
|
alwaysBundle: [/.*/],
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
|
||||||
|
export default [
|
||||||
|
defineConfig({
|
||||||
|
...shared,
|
||||||
|
entry: ["backend/app.ts"],
|
||||||
|
}),
|
||||||
|
defineConfig({
|
||||||
|
...shared,
|
||||||
|
/** 第二个配置不 clean,避免清掉第一个的输出 */
|
||||||
|
clean: false,
|
||||||
|
entry: ["基准测试_llrt.ts"],
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user