File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/cloudflare/src/cli/build Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ const optionalDependencies = [
48
48
export async function bundleServer ( buildOpts : BuildOptions ) : Promise < void > {
49
49
patches . copyPackageCliFiles ( packageDistDir , buildOpts ) ;
50
50
51
- const { appPath, outputDir, monorepoRoot } = buildOpts ;
51
+ const { appPath, outputDir, monorepoRoot, debug } = buildOpts ;
52
52
const baseManifestPath = path . join (
53
53
outputDir ,
54
54
"server-functions/default" ,
@@ -76,7 +76,11 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
76
76
outfile : openNextServerBundle ,
77
77
format : "esm" ,
78
78
target : "esnext" ,
79
- minify : false ,
79
+ // Minify code as much as possible but stay safe by not renaming identifiers
80
+ minifyWhitespace : ! debug ,
81
+ minifyIdentifiers : false ,
82
+ minifySyntax : ! debug ,
83
+ legalComments : "none" ,
80
84
metafile : true ,
81
85
// Next traces files using the default conditions from `nft` (`node`, `require`, `import` and `default`)
82
86
//
You can’t perform that action at this time.
0 commit comments