@akanjs/devkit 3.0.0-alpha.94 → 3.0.0-alpha.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applicationBuildRunner.ts +13 -3
- package/package.json +2 -2
|
@@ -68,6 +68,16 @@ export const AKAN_OPTIONAL_BACKEND_EXTERNALS = [
|
|
|
68
68
|
"protobufjs",
|
|
69
69
|
] as const;
|
|
70
70
|
|
|
71
|
+
const MINIFY_PROBE = ((): { minify: Bun.BuildConfig["minify"]; sourcemap?: Bun.BuildConfig["sourcemap"] } => {
|
|
72
|
+
const mode = process.env.AKAN_MINIFY_PROBE ?? "all";
|
|
73
|
+
if (mode === "noident") return { minify: { whitespace: true, syntax: true, identifiers: false } };
|
|
74
|
+
if (mode === "noident-map")
|
|
75
|
+
return { minify: { whitespace: true, syntax: true, identifiers: false }, sourcemap: "linked" };
|
|
76
|
+
if (mode === "syntax-map") return { minify: { whitespace: false, syntax: true, identifiers: false }, sourcemap: "linked" };
|
|
77
|
+
if (mode === "none") return { minify: false, sourcemap: "linked" };
|
|
78
|
+
return { minify: true };
|
|
79
|
+
})();
|
|
80
|
+
|
|
71
81
|
export class ApplicationBuildRunner {
|
|
72
82
|
#app: App;
|
|
73
83
|
#fast: boolean;
|
|
@@ -203,7 +213,7 @@ export class ApplicationBuildRunner {
|
|
|
203
213
|
entrypoints: backendEntryPoints,
|
|
204
214
|
outdir: this.#app.dist.cwdPath,
|
|
205
215
|
target: "bun",
|
|
206
|
-
|
|
216
|
+
...MINIFY_PROBE,
|
|
207
217
|
naming: { entry: "[name].[ext]", chunk: "chunk-[hash].[ext]" },
|
|
208
218
|
define: { "process.env.NODE_ENV": JSON.stringify("production") },
|
|
209
219
|
plugins: backendExternals.length > 0 ? [this.#createExternalSpecifiersPlugin(backendExternals)] : [],
|
|
@@ -214,7 +224,7 @@ export class ApplicationBuildRunner {
|
|
|
214
224
|
entrypoints: [this.#resolveRscWorkerBuildEntry()],
|
|
215
225
|
outdir: this.#app.dist.cwdPath,
|
|
216
226
|
target: "bun",
|
|
217
|
-
|
|
227
|
+
...MINIFY_PROBE,
|
|
218
228
|
naming: { entry: "[name].[ext]", chunk: "chunk-[hash].[ext]" },
|
|
219
229
|
conditions: ["react-server"],
|
|
220
230
|
// `akan build` must embed production react-server-dom regardless of the shell's NODE_ENV.
|
|
@@ -226,7 +236,7 @@ export class ApplicationBuildRunner {
|
|
|
226
236
|
entrypoints: [this.#resolveConsoleRuntimeBuildEntry()],
|
|
227
237
|
outdir: this.#app.dist.cwdPath,
|
|
228
238
|
target: "bun",
|
|
229
|
-
|
|
239
|
+
...MINIFY_PROBE,
|
|
230
240
|
naming: { entry: "console-runtime.[ext]", chunk: "chunk-[hash].[ext]" },
|
|
231
241
|
define: { "process.env.NODE_ENV": JSON.stringify("production") },
|
|
232
242
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/devkit",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.95",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@langchain/openai": "^1.4.6",
|
|
45
45
|
"@tailwindcss/node": "^4.3.0",
|
|
46
46
|
"@trapezedev/project": "^7.1.4",
|
|
47
|
-
"akanjs": "3.0.0-alpha.
|
|
47
|
+
"akanjs": "3.0.0-alpha.95",
|
|
48
48
|
"chalk": "^5.6.2",
|
|
49
49
|
"commander": "^14.0.3",
|
|
50
50
|
"dayjs": "^1.11.20",
|