Skip to content

Commit cf5a431

Browse files
committed
⚙ chore(#142): Next.js SWC를 사용하여 Babel 설정 없이 console.log 제거
1 parent 2bc167e commit cf5a431

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

next.config.mjs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,8 @@ const nextConfig = {
55
images: {
66
domains: ['lettering-images.s3.amazonaws.com']
77
},
8-
webpack: (config, { isServer }) => {
9-
if (!isServer) {
10-
config.optimization.minimize = true;
11-
config.module.rules.push({
12-
test: /\.(js|ts|tsx)$/,
13-
exclude: /node_modules/,
14-
use: {
15-
loader: 'babel-loader',
16-
options: {
17-
presets: ['next/babel'],
18-
plugins: [['transform-remove-console']]
19-
}
20-
}
21-
});
22-
}
23-
return config;
8+
compiler: {
9+
removeConsole: process.env.NODE_ENV === 'production'
2410
}
2511
};
2612

0 commit comments

Comments
 (0)