Skip to content

Commit 84fc843

Browse files
committed
Fix pageExtensions and order attributes
1 parent 5d2e0cc commit 84fc843

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

apps/trustlab/next.config.mjs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@ const outputFileTracingRoot = PROJECT_ROOT
88

99
/** @type {import('next').NextConfig} */
1010
const nextConfig = {
11-
transpilePackages: ["@commons-ui/core", "@commons-ui/next"],
12-
reactStrictMode: true,
11+
images: {
12+
domains: process.env.NEXT_PUBLIC_IMAGE_DOMAINS?.split(",")
13+
?.map((d) => d.trim())
14+
?.filter((d) => d),
15+
unoptimized:
16+
process.env.NEXT_PUBLIC_IMAGE_UNOPTIMIZED?.trim()?.toLowerCase() ===
17+
"true",
18+
},
1319
output: "standalone",
1420
outputFileTracingRoot,
21+
// TODO(kilemensi): There is an upstream bug on this @ https://github.com/vercel/next.js/issues/51478
22+
// `js`, `ts`, `tsx` are just to make sure there is more than one item;
23+
// we SHOULDN'T use them in pages router!
24+
pageExtensions: ["page.js", "js", "ts", "tsx"],
25+
reactStrictMode: true,
1526
webpack: (config) => {
1627
config.module.rules.push(
1728
{
@@ -29,14 +40,7 @@ const nextConfig = {
2940
config.experiments = { ...config.experiments, topLevelAwait: true };
3041
return config;
3142
},
32-
images: {
33-
domains: process.env.NEXT_PUBLIC_IMAGE_DOMAINS?.split(",")
34-
?.map((d) => d.trim())
35-
?.filter((d) => d),
36-
unoptimized:
37-
process.env.NEXT_PUBLIC_IMAGE_UNOPTIMIZED?.trim()?.toLowerCase() ===
38-
"true",
39-
},
43+
transpilePackages: ["@commons-ui/core", "@commons-ui/next"],
4044
};
4145

4246
export default withPayload(nextConfig);

0 commit comments

Comments
 (0)