-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
39 lines (38 loc) · 981 Bytes
/
next.config.js
File metadata and controls
39 lines (38 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const removeImports = require('next-remove-imports')()
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
module.exports = withBundleAnalyzer(removeImports({
distDir: 'build',
typescript: {
// Temporarily ignore build errors during transition
ignoreBuildErrors: true,
},
experimental: {
// Disable SWC lockfile patching to prevent pnpm conflicts
forceSwcTransforms: false,
},
compiler: {
// Enable styled-components with SSR support (replaces .babelrc)
styledComponents: {
ssr: true,
},
},
images: {
// Configure image qualities for Next.js 15+
qualities: [40, 70, 75, 80, 85, 90, 95]
},
i18n: {
locales: ['en-US', 'fr', 'debug'],
defaultLocale: 'fr',
},
pageExtensions: ['tsx', 'ts', 'jsx', 'js'],
webpack: (config) => {
// Exclude test files from build
config.module.rules.push({
test: /\.(test|spec)\.(js|jsx|ts|tsx)$/,
loader: 'ignore-loader'
})
return config
},
}))