mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-19 23:16:48 +00:00
Merge branch 'main' into develop
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||
enabled: process.env.ANALYZE === 'true'
|
||||
})
|
||||
|
||||
module.exports = withBundleAnalyzer({
|
||||
future: {
|
||||
webpack5: true
|
||||
@@ -46,13 +47,13 @@ module.exports = withBundleAnalyzer({
|
||||
},
|
||||
webpack: (config, { dev, isServer }) => {
|
||||
// Replace React with Preact only in client production build
|
||||
if (!dev && !isServer) {
|
||||
Object.assign(config.resolve.alias, {
|
||||
react: 'preact/compat',
|
||||
'react-dom/test-utils': 'preact/test-utils',
|
||||
'react-dom': 'preact/compat'
|
||||
})
|
||||
}
|
||||
// if (!dev && !isServer) {
|
||||
// Object.assign(config.resolve.alias, {
|
||||
// react: 'preact/compat',
|
||||
// 'react-dom/test-utils': 'preact/test-utils',
|
||||
// 'react-dom': 'preact/compat'
|
||||
// })
|
||||
// }
|
||||
return config
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user