Skip to content

Commit c13d8e7

Browse files
feat(Million): Added Million package to optimize DOM
1 parent 85476c4 commit c13d8e7

File tree

3 files changed

+108
-15
lines changed

3 files changed

+108
-15
lines changed

next.config.js

+24-14
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
1-
const withPWA = require('next-pwa')({
2-
dest: 'public',
3-
swSrc: 'service-worker.js'
4-
})
1+
const million = require("million/compiler");
2+
const withPWA = require("next-pwa")({
3+
dest: "public",
4+
swSrc: "service-worker.js",
5+
});
56

67
/** @type {import('next').NextConfig} */
7-
8-
module.exports = withPWA({
9-
output: 'standalone',
8+
let nextConfig = {
9+
output: "standalone",
1010
reactStrictMode: true,
1111
productionBrowserSourceMaps: true,
1212
i18n: {
13-
locales: ['de', 'en', 'fr', 'es', 'pl', 'cz'],
14-
defaultLocale: 'en',
13+
locales: ["de", "en", "fr", "es", "pl", "cz"],
14+
defaultLocale: "en",
1515
},
1616
async rewrites() {
1717
return [
1818
{
19-
source: '/datenschutz',
20-
destination: '/privacy-policy',
19+
source: "/datenschutz",
20+
destination: "/privacy-policy",
2121
},
22-
]
23-
}
24-
});
22+
];
23+
},
24+
};
25+
26+
const millionConfig = {
27+
auto: true,
28+
// if you're using RSC:
29+
// auto: { rsc: true },
30+
};
31+
32+
nextConfig = million.next(nextConfig, millionConfig);
33+
34+
module.exports = withPWA(nextConfig);

package-lock.json

+83-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@types/react-dom": "18.2.7",
1919
"eslint-config-sznm": "^2.0.2",
2020
"jest-worker": "^29.6.2",
21+
"million": "^2.5.13",
2122
"next": "13.4.16",
2223
"next-intl": "^2.19.1",
2324
"next-pwa": "^5.6.0",

0 commit comments

Comments
 (0)