Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 23372fc

Browse files
committed
chore: test preact
1 parent eb34c3f commit 23372fc

File tree

3 files changed

+74
-28
lines changed

3 files changed

+74
-28
lines changed

next.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const webpack = require('webpack')
44
const withPlugins = require('next-compose-plugins')
55
const withSourceMaps = require('@zeit/next-source-maps')()
66
const withOffline = require('next-offline')
7+
const withPreact = require('next-plugin-preact')
78
const withBundleAnalyzer = require('@next/bundle-analyzer')({
89
enabled: process.env.ANALYZE === 'true',
910
})
@@ -26,6 +27,11 @@ const nextConfig = {
2627
}
2728

2829
module.exports = withPlugins(
29-
[withBundleAnalyzer, withSourceMaps, [withOffline, offlineConfig]],
30+
[
31+
withPreact,
32+
withBundleAnalyzer,
33+
withSourceMaps,
34+
[withOffline, offlineConfig],
35+
],
3036
nextConfig,
3137
)

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,28 @@
8383
"mobx-state-tree": "5.0.2",
8484
"module-alias": "^2.0.1",
8585
"nanoid": "^3.1.12",
86-
"next": "11.0.1",
86+
"next": "^11.0.1",
8787
"next-compose-plugins": "^2.2.0",
8888
"next-i18next": "4.4.1",
8989
"next-offline": "4.0.6",
90+
"next-plugin-preact": "^3.0.6",
9091
"nextjs-progressbar": "0.0.11",
9192
"overlayscrollbars": "1.13.1",
9293
"path-match": "^1.2.4",
9394
"polished": "4.1.3",
95+
"preact": "^10.5.14",
96+
"preact-render-to-string": "^5.1.19",
9497
"promise-timeout": "^1.3.0",
9598
"prop-types": "^15.5.10",
9699
"pubsub-js": "^1.9.3",
97100
"qrcode-react": "^0.1.16",
98101
"ramda": "0.26.1",
99-
"react": "17.0.2",
102+
"react": "npm:@preact/compat",
100103
"react-animation": "^1.2.2",
101104
"react-calendar-heatmap": "1.8.1",
102105
"react-content-loader": "3.4.2",
103106
"react-copy-to-clipboard": "^5.0.3",
104-
"react-dom": "17.0.2",
107+
"react-dom": "npm:@preact/compat",
105108
"react-highlight-words": "^0.16.0",
106109
"react-lazy-load-image-component": "1.5.0",
107110
"react-masonry-component": "^6.0.1",
@@ -110,6 +113,7 @@
110113
"react-resize-detector": "4.2.3",
111114
"react-select": "^3.1.0",
112115
"react-sortable-hoc": "1.7.1",
116+
"react-ssr-prepass": "npm:preact-ssr-prepass",
113117
"react-svg": "11.1.2",
114118
"react-swipeable": "^5.5.1",
115119
"react-textarea-autosize": "^8.3.0",

yarn.lock

Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,34 @@
10161016
version "2.9.2"
10171017
resolved "https://registry.npm.taobao.org/@popperjs/core/download/@popperjs/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353"
10181018

1019+
"@prefresh/babel-plugin@0.4.1":
1020+
version "0.4.1"
1021+
resolved "https://registry.nlark.com/@prefresh/babel-plugin/download/@prefresh/babel-plugin-0.4.1.tgz#c4e843f7c5e56c15f1185979a8559c893ffb4a35"
1022+
1023+
"@prefresh/core@^1.3.1":
1024+
version "1.3.2"
1025+
resolved "https://registry.npm.taobao.org/@prefresh/core/download/@prefresh/core-1.3.2.tgz#97f966759b16e5f4c52361972e3c61ccac9ce396"
1026+
1027+
"@prefresh/next@^1.4.6":
1028+
version "1.4.6"
1029+
resolved "https://registry.nlark.com/@prefresh/next/download/@prefresh/next-1.4.6.tgz#1ec73696ba6fd39aaac8db506c506fcd29aa5f31"
1030+
dependencies:
1031+
"@prefresh/babel-plugin" "0.4.1"
1032+
"@prefresh/core" "^1.3.1"
1033+
"@prefresh/utils" "^1.0.0"
1034+
"@prefresh/webpack" "^3.2.0"
1035+
1036+
"@prefresh/utils@^1.0.0", "@prefresh/utils@^1.1.0":
1037+
version "1.1.1"
1038+
resolved "https://registry.npm.taobao.org/@prefresh/utils/download/@prefresh/utils-1.1.1.tgz#ffe7f2e6bd48a0633631a3d92c0ee4bdeb0ac330"
1039+
1040+
"@prefresh/webpack@^3.2.0", "@prefresh/webpack@^3.3.0":
1041+
version "3.3.2"
1042+
resolved "https://registry.nlark.com/@prefresh/webpack/download/@prefresh/webpack-3.3.2.tgz#058c4d61d733a4a8c111486f8aa1ae9b89820d9c"
1043+
dependencies:
1044+
"@prefresh/core" "^1.3.1"
1045+
"@prefresh/utils" "^1.1.0"
1046+
10191047
"@rushstack/eslint-patch@^1.0.6":
10201048
version "1.0.6"
10211049
resolved "https://registry.npm.taobao.org/@rushstack/eslint-patch/download/@rushstack/eslint-patch-1.0.6.tgz#023d72a5c4531b4ce204528971700a78a85a0c50"
@@ -7976,7 +8004,7 @@ modify-values@^1.0.0:
79768004
version "1.0.1"
79778005
resolved "https://registry.nlark.com/modify-values/download/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"
79788006

7979-
module-alias@^2.0.1:
8007+
module-alias@^2.0.0, module-alias@^2.0.1:
79808008
version "2.2.2"
79818009
resolved "https://registry.npm.taobao.org/module-alias/download/module-alias-2.2.2.tgz#151cdcecc24e25739ff0aa6e51e1c5716974c0e0"
79828010

@@ -8132,6 +8160,14 @@ next-offline@4.0.6:
81328160
webpack "^4.19.1"
81338161
workbox-webpack-plugin "^4.3.1"
81348162

8163+
next-plugin-preact@^3.0.6:
8164+
version "3.0.6"
8165+
resolved "https://registry.nlark.com/next-plugin-preact/download/next-plugin-preact-3.0.6.tgz#22d566e8e5d50cb4cfc78360d367df44d6aaf94f"
8166+
dependencies:
8167+
"@prefresh/next" "^1.4.6"
8168+
"@prefresh/webpack" "^3.3.0"
8169+
module-alias "^2.0.0"
8170+
81358171
next-tick@1, next-tick@^1.1.0:
81368172
version "1.1.0"
81378173
resolved "https://registry.npm.taobao.org/next-tick/download/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb"
@@ -8140,7 +8176,7 @@ next-tick@~1.0.0:
81408176
version "1.0.0"
81418177
resolved "https://registry.npm.taobao.org/next-tick/download/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
81428178

8143-
next@11.0.1:
8179+
next@^11.0.1:
81448180
version "11.0.1"
81458181
resolved "https://registry.nlark.com/next/download/next-11.0.1.tgz#b8e3914d153aaf7143cb98c09bcd3c8230eeb17a"
81468182
dependencies:
@@ -9005,6 +9041,16 @@ postcss@8.2.13:
90059041
nanoid "^3.1.22"
90069042
source-map "^0.6.1"
90079043

9044+
preact-render-to-string@^5.1.19:
9045+
version "5.1.19"
9046+
resolved "https://registry.npm.taobao.org/preact-render-to-string/download/preact-render-to-string-5.1.19.tgz#ffae7c3bd1680be5ecf5991d41fe3023b3051e0e"
9047+
dependencies:
9048+
pretty-format "^3.8.0"
9049+
9050+
preact@^10.5.14:
9051+
version "10.5.14"
9052+
resolved "https://registry.nlark.com/preact/download/preact-10.5.14.tgz#0b14a2eefba3c10a57116b90d1a65f5f00cd2701"
9053+
90089054
prelude-ls@^1.2.1:
90099055
version "1.2.1"
90109056
resolved "https://registry.nlark.com/prelude-ls/download/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -9042,6 +9088,10 @@ pretty-format@^26.0.0, pretty-format@^26.6.2:
90429088
ansi-styles "^4.0.0"
90439089
react-is "^17.0.1"
90449090

9091+
pretty-format@^3.8.0:
9092+
version "3.8.0"
9093+
resolved "https://registry.nlark.com/pretty-format/download/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385"
9094+
90459095
pretty-ms@~7.0.1:
90469096
version "7.0.1"
90479097
resolved "https://registry.npm.taobao.org/pretty-ms/download/pretty-ms-7.0.1.tgz#7d903eaab281f7d8e03c66f867e239dc32fb73e8"
@@ -9331,13 +9381,9 @@ react-copy-to-clipboard@^5.0.3:
93319381
copy-to-clipboard "^3"
93329382
prop-types "^15.5.8"
93339383

9334-
react-dom@17.0.2:
9335-
version "17.0.2"
9336-
resolved "https://registry.nlark.com/react-dom/download/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
9337-
dependencies:
9338-
loose-envify "^1.1.0"
9339-
object-assign "^4.1.1"
9340-
scheduler "^0.20.2"
9384+
"react-dom@npm:@preact/compat", "react@npm:@preact/compat":
9385+
version "0.0.4"
9386+
resolved "https://registry.nlark.com/@preact/compat/download/@preact/compat-0.0.4.tgz#f329e41caa330199eaf779c9bc9cf9556e3984a0"
93419387

93429388
react-event-listener@^0.6.2:
93439389
version "0.6.6"
@@ -9443,6 +9489,10 @@ react-sortable-hoc@1.7.1:
94439489
invariant "^2.2.4"
94449490
prop-types "^15.5.7"
94459491

9492+
"react-ssr-prepass@npm:preact-ssr-prepass":
9493+
version "1.2.0"
9494+
resolved "https://registry.nlark.com/preact-ssr-prepass/download/preact-ssr-prepass-1.2.0.tgz#f9c0545f18117971dcc6a09dbc3014067acce583"
9495+
94469496
react-svg@11.1.2:
94479497
version "11.1.2"
94489498
resolved "https://registry.nlark.com/react-svg/download/react-svg-11.1.2.tgz#f3364f7e8421432c48efa1826457268030cd7c9e"
@@ -9551,13 +9601,6 @@ react-waypoint@9.0.2:
95519601
prop-types "^15.0.0"
95529602
react-is "^16.6.3"
95539603

9554-
react@17.0.2:
9555-
version "17.0.2"
9556-
resolved "https://registry.nlark.com/react/download/react-17.0.2.tgz?cache=0&sync_timestamp=1627056961584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Freact%2Fdownload%2Freact-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
9557-
dependencies:
9558-
loose-envify "^1.1.0"
9559-
object-assign "^4.1.1"
9560-
95619604
read-pkg-up@^1.0.1:
95629605
version "1.0.1"
95639606
resolved "https://registry.nlark.com/read-pkg-up/download/read-pkg-up-1.0.1.tgz?cache=0&sync_timestamp=1618846971516&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg-up%2Fdownload%2Fread-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
@@ -9783,7 +9826,7 @@ request@^2.88.2:
97839826
tunnel-agent "^0.6.0"
97849827
uuid "^3.3.2"
97859828

9786-
"request@github:cypress-io/request#b5af0d1fa47eec97ba980cde90a13e69a2afcd16":
9829+
request@cypress-io/request#b5af0d1fa47eec97ba980cde90a13e69a2afcd16:
97879830
version "2.88.1"
97889831
resolved "https://codeload.github.com/cypress-io/request/tar.gz/b5af0d1fa47eec97ba980cde90a13e69a2afcd16"
97899832
dependencies:
@@ -10041,13 +10084,6 @@ scheduler@^0.19.1:
1004110084
loose-envify "^1.1.0"
1004210085
object-assign "^4.1.1"
1004310086

10044-
scheduler@^0.20.2:
10045-
version "0.20.2"
10046-
resolved "https://registry.nlark.com/scheduler/download/scheduler-0.20.2.tgz?cache=0&sync_timestamp=1627057076223&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fscheduler%2Fdownload%2Fscheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
10047-
dependencies:
10048-
loose-envify "^1.1.0"
10049-
object-assign "^4.1.1"
10050-
1005110087
schema-utils@^1.0.0:
1005210088
version "1.0.0"
1005310089
resolved "https://registry.nlark.com/schema-utils/download/schema-utils-1.0.0.tgz?cache=0&sync_timestamp=1626694835325&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fschema-utils%2Fdownload%2Fschema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"

0 commit comments

Comments
 (0)