Skip to content

Commit 303d8c8

Browse files
committed
keepNames default true, not experimental now
1 parent 9e41e83 commit 303d8c8

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

packages/cli-v3/src/build/bundle.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ async function createBuildOptions(
176176
const customConditions = options.resolvedConfig.build?.conditions ?? [];
177177
const conditions = [...customConditions, "trigger.dev", "module", "node"];
178178

179-
const keepNames = options.resolvedConfig.build?.experimental_keepNames ?? false;
179+
const keepNames =
180+
options.resolvedConfig.build?.keepNames ??
181+
options.resolvedConfig.build?.experimental_keepNames ??
182+
true;
180183
const minify = options.resolvedConfig.build?.experimental_minify ?? false;
181184

182185
const $buildPlugins = await buildPlugins(options.target, options.resolvedConfig);

packages/core/src/v3/config.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,22 @@ export type TriggerConfig = {
184184
experimental_autoDetectExternal?: boolean;
185185

186186
/**
187-
* **WARNING: This is an experimental feature and might be removed in a future version.**
187+
* This still works but use `keepNames` instead.
188188
*
189-
* Preserve the original names of functions and classes in the bundle. This can fix issues with frameworks that rely on the original names for registration and binding, for example MikroORM.
189+
* @default true
190190
*
191-
* @link https://esbuild.github.io/api/#keep-names
191+
* @deprecated (use keepNames instead)
192+
*/
193+
experimental_keepNames?: boolean;
194+
195+
/* Set to false to minify the original names of functions and classes in the bundle.
196+
* This can make bundles smaller at the cost of compatibility with frameworks that rely on function/class/variable names.
192197
*
193-
* @default false
198+
* @link https://esbuild.github.io/api/#keep-names
194199
*
195-
* @deprecated (experimental)
200+
* @default true
196201
*/
197-
experimental_keepNames?: boolean;
202+
keepNames?: boolean;
198203

199204
/**
200205
* **WARNING: This is an experimental feature and might be removed in a future version.**

0 commit comments

Comments
 (0)