Skip to content

Commit

Permalink
drop experimental config
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jul 31, 2024
1 parent 7371175 commit 844c8aa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
3 changes: 1 addition & 2 deletions packages/next/src/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ export default async function getBaseWebpackConfig(
output: {
ecma: 5,
safari10: true,
comments: config.experimental.minifyLicenses ? false : 'some',
comments: false,
// Fixes usage of Emoji and certain Regex
ascii_only: true,
...(process.env.__NEXT_MANGLING_DEBUG || noMangling
Expand Down Expand Up @@ -1117,7 +1117,6 @@ export default async function getBaseWebpackConfig(
...terserOptions.mangle,
},
},
minifyLicenses: config.experimental.minifyLicenses,
}).apply(compiler)
},
// Minify CSS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,16 @@ const debugMinify = process.env.NEXT_DEBUG_MINIFY
export class TerserPlugin {
options: {
terserOptions: any
minifyLicenses: boolean
}
constructor(
options: {
terserOptions?: any
minifyLicenses?: boolean
} = {}
) {
const { terserOptions = {}, minifyLicenses = true } = options
const { terserOptions = {} } = options

this.options = {
terserOptions,
minifyLicenses,
}
}

Expand Down Expand Up @@ -151,7 +148,7 @@ export class TerserPlugin {
mangle: true,
module: 'unknown',
output: {
comments: this.options.minifyLicenses ? false : 'some',
comments: false,
},
}
)
Expand Down
1 change: 0 additions & 1 deletion packages/next/src/server/config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ export const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>
linkNoTouchStart: z.boolean().optional(),
manualClientBasePath: z.boolean().optional(),
middlewarePrefetch: z.enum(['strict', 'flexible']).optional(),
minifyLicenses: z.boolean().optional(),
cssChunking: z.enum(['strict', 'loose']).optional(),
nextScriptWorkers: z.boolean().optional(),
// The critter option is unknown, use z.any() here
Expand Down
2 changes: 0 additions & 2 deletions packages/next/src/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ export interface LoggingConfig {
}

export interface ExperimentalConfig {
minifyLicenses?: boolean
appNavFailHandling?: boolean
flyingShuttle?: boolean
prerenderEarlyExit?: boolean
Expand Down Expand Up @@ -946,7 +945,6 @@ export const defaultConfig: NextConfig = {
output: !!process.env.NEXT_PRIVATE_STANDALONE ? 'standalone' : undefined,
modularizeImports: undefined,
experimental: {
minifyLicenses: true,
appNavFailHandling: Boolean(process.env.NEXT_PRIVATE_FLYING_SHUTTLE),
flyingShuttle: Boolean(process.env.NEXT_PRIVATE_FLYING_SHUTTLE),
prerenderEarlyExit: true,
Expand Down

0 comments on commit 844c8aa

Please sign in to comment.