-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
22 lines (19 loc) · 819 Bytes
/
Copy pathnext.config.js
File metadata and controls
22 lines (19 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module.exports = {
// https://nextjs.org/docs/api-reference/next.config.js/custom-webpack-config
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
/**
* this will enable preact instead of react. uncomment below to enable only in production
* from: https://github.com/timlrx/tailwind-nextjs-starter-blog/blob/master/next.config.js
*/
// if (!dev && !isServer) {
// Replace React with Preact only in client production build
Object.assign(config.resolve.alias, {
react: 'preact/compat',
'react-dom/test-utils': 'preact/test-utils',
'react-dom': 'preact/compat',
})
// }
// Important: return the modified config
return config
},
}