Compare commits

...

13 Commits

Author SHA1 Message Date
kodiakhq[bot] fca228744c
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-23 01:06:35 +00:00
kodiakhq[bot] e38e213633
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-22 20:40:24 +00:00
kodiakhq[bot] 75a82da7a9
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-14 22:15:25 +00:00
kodiakhq[bot] 0d8b1ca162
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-14 22:01:09 +00:00
kodiakhq[bot] 737cc0ae02
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-14 12:44:54 +00:00
kodiakhq[bot] 3aa823b684
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-14 12:32:37 +00:00
kodiakhq[bot] 5798ba3476
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-14 12:30:00 +00:00
kodiakhq[bot] f345020a45
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-14 10:40:13 +00:00
kodiakhq[bot] 925cbf06b2
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-14 04:15:10 +00:00
kodiakhq[bot] 79274beb53
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-13 23:10:47 +00:00
Omar López 3b9be08f40
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-10 18:57:26 -07:00
Omar López d95aa22cd2
Merge branch 'main' into zomars/cal-585-use-preact-on-production 2021-12-10 12:12:36 -07:00
zomars ccaf8bd3ad Adds preact for production builds 2021-12-10 11:18:08 -07:00
3 changed files with 19 additions and 1 deletions

View File

@ -53,6 +53,9 @@ if (process.env.ANALYZE === "true") {
plugins.push(withTM);
/**
* @type {import('next').NextConfig}
*/
// prettier-ignore
module.exports = () => plugins.reduce((acc, next) => next(acc), {
i18n,
@ -63,13 +66,22 @@ module.exports = () => plugins.reduce((acc, next) => next(acc), {
typescript: {
ignoreBuildErrors: true,
},
webpack: (config) => {
webpack: (config, { dev, isServer }) => {
config.resolve.fallback = {
...config.resolve.fallback, // if you miss it, all the other options in fallback, specified
// by next.js will be dropped. Doesn't make much sense, but how it is
fs: false,
};
// 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",
});
}
return config;
},
async redirects() {

View File

@ -77,6 +77,7 @@
"next-transpile-modules": "^9.0.0",
"nodemailer": "^6.7.1",
"otplib": "^12.0.1",
"preact": "^10.6.4",
"qrcode": "^1.5.0",
"react": "^17.0.2",
"react-date-picker": "^8.3.6",

View File

@ -7877,6 +7877,11 @@ preact@^10.4.1:
resolved "https://registry.yarnpkg.com/preact/-/preact-10.5.15.tgz#6df94d8afecf3f9e10a742fd8c362ddab464225f"
integrity sha512-5chK29n6QcJc3m1lVrKQSQ+V7K1Gb8HeQY6FViQ5AxCAEGu3DaHffWNDkC9+miZgsLvbvU9rxbV1qinGHMHzqA==
preact@^10.6.4:
version "10.6.4"
resolved "https://registry.yarnpkg.com/preact/-/preact-10.6.4.tgz#ad12c409ff1b4316158486e0a7b8d43636f7ced8"
integrity sha512-WyosM7pxGcndU8hY0OQlLd54tOU+qmG45QXj2dAYrL11HoyU/EzOSTlpJsirbBr1QW7lICxSsVJJmcmUglovHQ==
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"