File tree Expand file tree Collapse file tree 5 files changed +10
-20
lines changed
Expand file tree Collapse file tree 5 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 1- const path = require ( 'path' )
21const moduleAlias = require ( 'module-alias' )
32
43module . exports = ( ) => {
5- moduleAlias . addAlias ( 'react' , path . join ( __dirname , './preact-compat.js' ) )
6- moduleAlias . addAlias ( 'react-dom' , 'preact-compat' )
4+ moduleAlias . addAlias ( 'react' , 'preact/compat' )
5+ moduleAlias . addAlias ( 'react-dom' , 'preact/compat' )
6+ moduleAlias . addAlias ( 'react-ssr-prepass' , 'preact-ssr-prepass' )
77}
Original file line number Diff line number Diff line change 1- const path = require ( 'path' )
2-
31module . exports = ( nextConfig = { } ) => {
42 return Object . assign ( { } , nextConfig , {
53 webpack ( config , options ) {
@@ -14,10 +12,10 @@ module.exports = (nextConfig = {}) => {
1412 }
1513
1614 config . resolve . alias = Object . assign ( { } , config . resolve . alias , {
17- react$ : path . join ( __dirname , './ preact- compat.js' ) ,
18- 'react-dom$' : 'preact- compat' ,
19- react : path . join ( __dirname , './ preact- compat.js' ) ,
20- 'react-dom' : 'preact- compat'
15+ react$ : ' preact/ compat' ,
16+ 'react-dom$' : 'preact/ compat' ,
17+ react : ' preact/ compat' ,
18+ 'react-dom' : 'preact/ compat'
2119 } )
2220
2321 if ( typeof nextConfig . webpack === 'function' ) {
Original file line number Diff line number Diff line change 55 "license" : " MIT" ,
66 "repository" : " zeit/next-plugins" ,
77 "peerDependencies" : {
8- "preact" : " ^8.2.0" ,
9- "preact-compat" : " ^3.17.0" ,
10- "preact-context" : " ^1.1.3"
8+ "preact" : " ^10.0.0"
119 },
1210 "dependencies" : {
1311 "module-alias" : " 2.0.6"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ Use [preact](https://preactjs.com/) with [Next.js](https://github.com/zeit/next.
55## Installation
66
77```
8- npm install --save @zeit/next-preact preact preact-compat preact-context
8+ npm install --save @zeit/next-preact preact preact-ssr-prepass
99```
1010
1111or
1212
1313```
14- yarn add @zeit/next-preact preact preact-compat preact-context
14+ yarn add @zeit/next-preact preact preact-ssr-prepass
1515```
1616
1717## Usage
You can’t perform that action at this time.
0 commit comments