Skip to content

Commit f2b8a6b

Browse files
authoredJul 6, 2022
Enable swc minifier in create next apps (#38215)
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
1 parent 9573174 commit f2b8a6b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
reactStrictMode: true,
4+
swcMinify: true,
45
}
56

67
module.exports = nextConfig
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
reactStrictMode: true,
4+
swcMinify: true,
45
}
56

67
module.exports = nextConfig

‎packages/next/server/config.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,7 @@ function assignDefaults(userConfig: { [key: string]: any }) {
523523
}
524524

525525
if (result.swcMinify) {
526-
Log.warn(
527-
'SWC minify release candidate enabled. https://nextjs.org/docs/messages/swc-minify-enabled'
528-
)
526+
Log.info('SWC minify release candidate enabled. https://nextjs.link/swcmin')
529527
}
530528

531529
if (result.experimental?.swcMinifyDebugOptions) {

0 commit comments

Comments
 (0)
Please sign in to comment.