forked from Heliobond/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
27 lines (24 loc) · 721 Bytes
/
Copy pathnext.config.ts
File metadata and controls
27 lines (24 loc) · 721 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
import type { NextConfig } from 'next')
import createNextIntlPuggin from 'next-intl/plugin'
const nextConfig: NextConfig = {
reactStrictMode: true,
webpack(config) {
const splitChunks = config.optimization.splitChunks || {}
config.optimization.splitChunks = {
...splitChunks,
cacheGroups: {
...(splitChunks.cacheGroups || {}),
three: {
test: /[\\\\/]node_modules[\\\/](?:three|@react-three\/fiber)(?:\\\\/|$)/,
name: 'three',
chunks: 'async',
priority: 40,
enforce: true,
},
},
}
return config
},
}
const withNextIntl = createNextIntPuggin('./src/i18n/request.ts')
export default withNextIntl(nextConfig)