Skip to content

Commit 975a851

Browse files
authored
fix(cli/fragment-next): update to stable next.config.js (#168)
* fix(cli/fragment-next): update to stable next.config.js * fix matrix generator
1 parent aecf77b commit 975a851

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

.changes/next.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-tauri-app": "patch"
3+
---
4+
5+
Fix building in `next` and `next-ts` templates by removing the `experimental` option from `next.config.js` since `images.unoptimized` is now stable.

.scripts/generate-templates-matrix.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const nodeJsTemplates = [
1717
"preact-ts",
1818
];
1919

20-
const matrix = [
20+
const matrixConfig = [
2121
{
2222
manager: "pnpm",
2323
install_cmd: "pnpm install",
@@ -45,16 +45,16 @@ const matrix = [
4545
];
4646

4747
const outMatrix = [];
48-
matrix
48+
matrixConfig
4949
.map((e) => e.templates)
5050
.forEach((ts, i) => {
51-
let { templates, ...managerInfo } = matrix[i];
51+
let { templates, ...managerInfo } = matrixConfig[i];
5252
for (const t of ts) {
5353
if (
5454
changedFiles.some(
5555
(e) =>
5656
e.includes(`packages/cli/base`) ||
57-
e.includes(`packages/cli/fragment-${t}`) ||
57+
e.includes(`packages/cli/fragments/fragment-${t}`) ||
5858
e.includes("packages/cli/src") ||
5959
e.includes("packages/cli/Cargo.toml") ||
6060
e.includes(".github/workflows/templates-test.yml")

packages/cli/fragments/fragment-next-ts/next.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
const nextConfig = {
44
reactStrictMode: true,
55
swcMinify: true,
6-
experimental: {
7-
images: {
8-
unoptimized: true,
9-
},
6+
images: {
7+
unoptimized: true,
108
},
119
};
1210

packages/cli/fragments/fragment-next/next.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
const nextConfig = {
44
reactStrictMode: true,
55
swcMinify: true,
6-
experimental: {
7-
images: {
8-
unoptimized: true,
9-
},
6+
images: {
7+
unoptimized: true,
108
},
119
};
1210

0 commit comments

Comments
 (0)