Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dff9d28

Browse files
committed
add back react alias to preact
1 parent 65445f8 commit dff9d28

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

next.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ module.exports = {
44
webpack: (config, { dev }) => {
55
/* Enable only in Production */
66
if (!dev) {
7-
// // Preact
8-
// console.log('> Using Preact instead of React');
9-
// config.resolve.alias = {
10-
// react: 'preact-compat/dist/preact-compat',
11-
// 'react-dom': 'preact-compat/dist/preact-compat',
12-
// };
7+
// Preact
8+
console.log('> Using Preact instead of React');
9+
config.resolve.alias = {
10+
react: 'preact-compat/dist/preact-compat',
11+
'react-dom': 'preact-compat/dist/preact-compat',
12+
};
1313
if (ANALYZE) {
1414
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
1515
config.plugins.push(

0 commit comments

Comments
 (0)