create-waku 0.10.5 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/01_template/package.json +6 -6
- package/template/01_template/tsconfig.tsbuildinfo +1 -1
- package/template/02_template_js/package.json +5 -5
- package/template/03_demo/package.json +6 -6
- package/template/03_demo/src/lib/index.ts +1 -1
- package/template/03_demo/src/pages/[slug].tsx +2 -3
- package/template/03_demo/tsconfig.tsbuildinfo +1 -1
- package/template/04_cssmodules/package.json +5 -5
- package/template/04_cssmodules/src/styles.css +12 -12
- package/template/04_cssmodules/tsconfig.tsbuildinfo +1 -1
- package/template/11_fs-router/package.json +5 -5
- package/template/11_fs-router/src/pages/nested/[name].tsx +3 -1
- package/template/11_fs-router/tsconfig.tsbuildinfo +1 -1
- package/template/12_nossr/package.json +6 -6
- package/template/12_nossr/tsconfig.tsbuildinfo +1 -1
- package/template/21_create-pages/package.json +5 -5
- package/template/21_create-pages/tsconfig.tsbuildinfo +1 -1
- package/template/22_define-router/package.json +5 -5
- package/template/22_define-router/src/components/HomeLayout.tsx +6 -0
- package/template/22_define-router/src/entries.tsx +38 -0
- package/template/22_define-router/tsconfig.tsbuildinfo +1 -1
- package/template/31_minimal/package.json +5 -5
- package/template/31_minimal/tsconfig.tsbuildinfo +1 -1
- package/template/32_minimal_js/package.json +4 -4
- package/template/32_minimal_js/src/entries.jsx +13 -22
- package/template/32_minimal_js/waku.config.ts +11 -0
- package/template/33_promise/package.json +5 -5
- package/template/33_promise/src/entries.tsx +31 -29
- package/template/33_promise/tsconfig.tsbuildinfo +1 -1
- package/template/33_promise/waku.config.ts +11 -0
- package/template/34_functions/package.json +5 -5
- package/template/34_functions/tsconfig.tsbuildinfo +1 -1
- package/template/35_nesting/package.json +5 -5
- package/template/35_nesting/tsconfig.tsbuildinfo +1 -1
- package/template/36_form/package.json +5 -5
- package/template/36_form/src/als.ts +16 -0
- package/template/36_form/src/components/funcs.ts +1 -1
- package/template/36_form/src/entries.tsx +25 -22
- package/template/36_form/tsconfig.json +1 -1
- package/template/36_form/tsconfig.tsbuildinfo +1 -1
- package/template/36_form/waku.config.ts +11 -0
- package/template/37_css/package.json +6 -6
- package/template/37_css/src/entries.tsx +29 -26
- package/template/37_css/tsconfig.tsbuildinfo +1 -1
- package/template/37_css/waku.config.ts +11 -0
- package/template/38_cookies/package.json +8 -8
- package/template/38_cookies/src/components/App.tsx +1 -1
- package/template/38_cookies/tsconfig.tsbuildinfo +1 -1
- package/template/39_api/package.json +5 -5
- package/template/39_api/tsconfig.tsbuildinfo +1 -1
- package/template/41_path-alias/package.json +6 -6
- package/template/41_path-alias/src/entries.tsx +14 -22
- package/template/41_path-alias/tsconfig.tsbuildinfo +1 -1
- package/template/41_path-alias/waku.config.ts +11 -0
- package/template/42_react-tweet/package.json +6 -6
- package/template/42_react-tweet/src/entries.tsx +1 -1
- package/template/42_react-tweet/src/main.tsx +1 -1
- package/template/42_react-tweet/tsconfig.tsbuildinfo +1 -1
- package/template/43_weave-render/package.json +5 -5
- package/template/43_weave-render/src/components/BarLayout.tsx +1 -1
- package/template/43_weave-render/src/components/FooLayout.tsx +4 -8
- package/template/43_weave-render/src/components/HomeLayout.tsx +38 -41
- package/template/43_weave-render/src/entries.tsx +1 -1
- package/template/43_weave-render/src/main.tsx +1 -1
- package/template/43_weave-render/tsconfig.tsbuildinfo +1 -1
- package/template/44_cloudflare/.wrangler/types/runtime.d.ts +5701 -0
- package/template/44_cloudflare/package.json +27 -0
- package/template/44_cloudflare/public/404.html +1 -0
- package/template/44_cloudflare/src/components/App.tsx +51 -0
- package/template/44_cloudflare/src/components/Counter.tsx +16 -0
- package/template/44_cloudflare/src/entries.tsx +18 -0
- package/template/44_cloudflare/src/main.tsx +17 -0
- package/template/44_cloudflare/tsconfig.eslint.json +7 -0
- package/template/44_cloudflare/tsconfig.json +15 -0
- package/template/44_cloudflare/tsconfig.tsbuildinfo +1 -0
- package/template/44_cloudflare/waku.cloudflare-dev-server.ts +22 -0
- package/template/44_cloudflare/waku.config.ts +37 -0
- package/template/44_cloudflare/worker-configuration.d.ts +6 -0
- package/template/44_cloudflare/wrangler.toml +15 -0
package/package.json
CHANGED
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
20
|
"autoprefixer": "10.4.20",
|
|
21
|
-
"tailwindcss": "3.4.
|
|
22
|
-
"typescript": "5.
|
|
21
|
+
"tailwindcss": "3.4.15",
|
|
22
|
+
"typescript": "5.7.2"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.
|
|
1
|
+
{"root":["./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.7.2"}
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"autoprefixer": "10.4.20",
|
|
19
|
-
"tailwindcss": "3.4.
|
|
19
|
+
"tailwindcss": "3.4.15"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
20
|
"autoprefixer": "10.4.20",
|
|
21
|
-
"tailwindcss": "3.4.
|
|
22
|
-
"typescript": "5.
|
|
21
|
+
"tailwindcss": "3.4.15",
|
|
22
|
+
"typescript": "5.7.2"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Link } from 'waku';
|
|
2
|
+
import type { PageProps } from 'waku/router';
|
|
2
3
|
|
|
3
4
|
import { getPokemonPaths } from '../lib';
|
|
4
5
|
import { pokemon } from '../lib/pokemon';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export default async function PokemonPage({ slug }: PokemonPageProps) {
|
|
7
|
+
export default async function PokemonPage({ slug }: PageProps<'/[slug]'>) {
|
|
9
8
|
const pokemon = await getPokemon(slug);
|
|
10
9
|
|
|
11
10
|
if (!pokemon) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/components/footer.tsx","./src/components/header.tsx","./src/components/reload.tsx","./src/lib/index.ts","./src/lib/pokemon.ts","./src/pages/[slug].tsx","./src/pages/_layout.tsx","./src/pages/index.tsx"],"version":"5.
|
|
1
|
+
{"root":["./src/components/footer.tsx","./src/components/header.tsx","./src/components/reload.tsx","./src/lib/index.ts","./src/lib/pokemon.ts","./src/pages/[slug].tsx","./src/pages/_layout.tsx","./src/pages/index.tsx"],"version":"5.7.2"}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
|
-
"typescript": "5.
|
|
20
|
+
"typescript": "5.7.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -201,9 +201,9 @@ video {
|
|
|
201
201
|
font-display: swap;
|
|
202
202
|
src: url(https://fonts.gstatic.com/s/nunito/v26/XRXX3I6Li01BKofIMNaMRs7nczIHNHI.woff2)
|
|
203
203
|
format('woff2');
|
|
204
|
-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
|
|
205
|
-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
|
|
206
|
-
U+1EA0-1EF9, U+20AB;
|
|
204
|
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
|
|
205
|
+
U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
|
|
206
|
+
U+0329, U+1EA0-1EF9, U+20AB;
|
|
207
207
|
}
|
|
208
208
|
@font-face {
|
|
209
209
|
font-family: 'Nunito';
|
|
@@ -252,9 +252,9 @@ video {
|
|
|
252
252
|
font-display: swap;
|
|
253
253
|
src: url(https://fonts.gstatic.com/s/nunito/v26/XRXX3I6Li01BKofIMNaMRs7nczIHNHI.woff2)
|
|
254
254
|
format('woff2');
|
|
255
|
-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
|
|
256
|
-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
|
|
257
|
-
U+1EA0-1EF9, U+20AB;
|
|
255
|
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
|
|
256
|
+
U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
|
|
257
|
+
U+0329, U+1EA0-1EF9, U+20AB;
|
|
258
258
|
}
|
|
259
259
|
@font-face {
|
|
260
260
|
font-family: 'Nunito';
|
|
@@ -303,9 +303,9 @@ video {
|
|
|
303
303
|
font-display: swap;
|
|
304
304
|
src: url(https://fonts.gstatic.com/s/nunito/v26/XRXV3I6Li01BKofIOuaBTMnFcQIG.woff2)
|
|
305
305
|
format('woff2');
|
|
306
|
-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
|
|
307
|
-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
|
|
308
|
-
U+1EA0-1EF9, U+20AB;
|
|
306
|
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
|
|
307
|
+
U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
|
|
308
|
+
U+0329, U+1EA0-1EF9, U+20AB;
|
|
309
309
|
}
|
|
310
310
|
@font-face {
|
|
311
311
|
font-family: 'Nunito';
|
|
@@ -354,9 +354,9 @@ video {
|
|
|
354
354
|
font-display: swap;
|
|
355
355
|
src: url(https://fonts.gstatic.com/s/nunito/v26/XRXV3I6Li01BKofIOuaBTMnFcQIG.woff2)
|
|
356
356
|
format('woff2');
|
|
357
|
-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
|
|
358
|
-
U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
|
|
359
|
-
U+1EA0-1EF9, U+20AB;
|
|
357
|
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
|
|
358
|
+
U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
|
|
359
|
+
U+0329, U+1EA0-1EF9, U+20AB;
|
|
360
360
|
}
|
|
361
361
|
@font-face {
|
|
362
362
|
font-family: 'Nunito';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/types.d.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.
|
|
1
|
+
{"root":["./src/types.d.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.7.2"}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
|
-
"typescript": "5.
|
|
20
|
+
"typescript": "5.7.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/Counter.tsx","./src/pages/_layout.tsx","./src/pages/_root.tsx","./src/pages/bar.tsx","./src/pages/index.tsx","./src/pages/foo/index.tsx","./src/pages/nested/[name].tsx"],"version":"5.
|
|
1
|
+
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/Counter.tsx","./src/pages/_layout.tsx","./src/pages/_root.tsx","./src/pages/bar.tsx","./src/pages/index.tsx","./src/pages/foo/index.tsx","./src/pages/nested/[name].tsx"],"version":"5.7.2"}
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
20
|
"autoprefixer": "10.4.20",
|
|
21
|
-
"tailwindcss": "3.4.
|
|
22
|
-
"typescript": "5.
|
|
21
|
+
"tailwindcss": "3.4.15",
|
|
22
|
+
"typescript": "5.7.2",
|
|
23
23
|
"vite": "5.4.10"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./waku.config.ts","./src/entries.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.
|
|
1
|
+
{"root":["./waku.config.ts","./src/entries.ts","./src/components/counter.tsx","./src/components/footer.tsx","./src/components/header.tsx","./src/pages/_layout.tsx","./src/pages/about.tsx","./src/pages/index.tsx"],"version":"5.7.2"}
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
20
|
"server-only": "0.0.1",
|
|
21
|
-
"typescript": "5.
|
|
21
|
+
"typescript": "5.7.2"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/NestedQuxPage.tsx","./src/components/Root.tsx","./src/components/funcs.ts"],"version":"5.
|
|
1
|
+
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/NestedQuxPage.tsx","./src/components/Root.tsx","./src/components/funcs.ts"],"version":"5.7.2"}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
|
-
"typescript": "5.
|
|
20
|
+
"typescript": "5.7.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -45,6 +45,12 @@ const HomeLayout = ({ children }: { children: ReactNode }) => (
|
|
|
45
45
|
<li>
|
|
46
46
|
<Link to="/nested/baz">Nested / Baz</Link>
|
|
47
47
|
</li>
|
|
48
|
+
<li>
|
|
49
|
+
<Link to="/dynamic/foo">Dynamic / foo</Link>
|
|
50
|
+
</li>
|
|
51
|
+
<li>
|
|
52
|
+
<Link to="/dynamic/bar">Dynamic / bar</Link>
|
|
53
|
+
</li>
|
|
48
54
|
</ul>
|
|
49
55
|
{children}
|
|
50
56
|
</div>
|
|
@@ -54,6 +54,20 @@ export default new_defineRouter({
|
|
|
54
54
|
'page:/nested/baz': { isStatic: true },
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
pattern: '/dynamic/([^/]+)',
|
|
59
|
+
path: [
|
|
60
|
+
{ type: 'literal', name: 'dynamic' },
|
|
61
|
+
{ type: 'group', name: 'slug' },
|
|
62
|
+
],
|
|
63
|
+
routeElement: { isStatic: true },
|
|
64
|
+
elements: {
|
|
65
|
+
root: { isStatic: true },
|
|
66
|
+
'layout:/': { isStatic: true },
|
|
67
|
+
// using `[slug]` syntax is just an example and it technically conflicts with others. So, it's better to use a different prefix like `dynamic-page:`.
|
|
68
|
+
'page:/dynamic/[slug]': {},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
57
71
|
];
|
|
58
72
|
},
|
|
59
73
|
renderRoute: async (path) => {
|
|
@@ -153,6 +167,30 @@ export default new_defineRouter({
|
|
|
153
167
|
},
|
|
154
168
|
};
|
|
155
169
|
}
|
|
170
|
+
if (path.startsWith('/dynamic/')) {
|
|
171
|
+
return {
|
|
172
|
+
routeElement: (
|
|
173
|
+
<Slot id="root">
|
|
174
|
+
<Slot id="layout:/">
|
|
175
|
+
<Slot id="page:/dynamic/[slug]" />
|
|
176
|
+
</Slot>
|
|
177
|
+
</Slot>
|
|
178
|
+
),
|
|
179
|
+
elements: {
|
|
180
|
+
root: (
|
|
181
|
+
<Root>
|
|
182
|
+
<Children />
|
|
183
|
+
</Root>
|
|
184
|
+
),
|
|
185
|
+
'layout:/': (
|
|
186
|
+
<HomeLayout>
|
|
187
|
+
<Children />
|
|
188
|
+
</HomeLayout>
|
|
189
|
+
),
|
|
190
|
+
'page:/dynamic/[slug]': <h3>{path}</h3>,
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
}
|
|
156
194
|
throw new Error('renderRoute: No such path:' + path);
|
|
157
195
|
},
|
|
158
196
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/Root.tsx"],"version":"5.
|
|
1
|
+
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/BarPage.tsx","./src/components/Counter.tsx","./src/components/FooPage.tsx","./src/components/HomeLayout.tsx","./src/components/HomePage.tsx","./src/components/NestedBazPage.tsx","./src/components/Root.tsx"],"version":"5.7.2"}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
|
-
"typescript": "5.
|
|
20
|
+
"typescript": "5.7.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./waku.config.ts","./src/entries.tsx","./src/main.tsx","./src/components/App.tsx","./src/components/Counter.tsx"],"version":"5.
|
|
1
|
+
{"root":["./waku.config.ts","./src/entries.tsx","./src/main.tsx","./src/components/App.tsx","./src/components/Counter.tsx"],"version":"5.7.2"}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Slot } from 'waku/client';
|
|
1
|
+
import { new_defineEntries } from 'waku/minimal/server';
|
|
2
|
+
import { Slot } from 'waku/minimal/client';
|
|
3
3
|
|
|
4
4
|
import App from './components/app';
|
|
5
5
|
|
|
6
|
-
export default
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// getBuildConfig
|
|
14
|
-
async () => [{ pathname: '/', entries: [{ rscPath: '' }] }],
|
|
15
|
-
// getSsrConfig
|
|
16
|
-
async (pathname) => {
|
|
17
|
-
switch (pathname) {
|
|
18
|
-
case '/':
|
|
19
|
-
return {
|
|
20
|
-
rscPath: '',
|
|
21
|
-
html: <Slot id="App" />,
|
|
22
|
-
};
|
|
23
|
-
default:
|
|
24
|
-
return null;
|
|
6
|
+
export default new_defineEntries({
|
|
7
|
+
unstable_handleRequest: async (input, { renderRsc, renderHtml }) => {
|
|
8
|
+
if (input.type === 'component') {
|
|
9
|
+
return renderRsc({ App: <App name={input.rscPath || 'Waku'} /> });
|
|
10
|
+
}
|
|
11
|
+
if (input.type === 'custom' && input.pathname === '/') {
|
|
12
|
+
return renderHtml({ App: <App name="Waku" /> }, <Slot id="App" />, '');
|
|
25
13
|
}
|
|
26
14
|
},
|
|
27
|
-
)
|
|
15
|
+
unstable_getBuildConfig: async () => [
|
|
16
|
+
{ pathSpec: [], entries: [{ rscPath: '' }] },
|
|
17
|
+
],
|
|
18
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This is a temporary file while experimenting new_defineEntries
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'waku/config';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
middleware: () => [
|
|
7
|
+
import('waku/middleware/context'),
|
|
8
|
+
import('waku/middleware/dev-server'),
|
|
9
|
+
import('waku/middleware/handler'),
|
|
10
|
+
],
|
|
11
|
+
});
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
|
-
"typescript": "5.
|
|
20
|
+
"typescript": "5.7.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Children, Slot } from 'waku/client';
|
|
1
|
+
import { new_defineEntries } from 'waku/minimal/server';
|
|
2
|
+
import { Children, Slot } from 'waku/minimal/client';
|
|
3
|
+
|
|
3
4
|
import App from './components/App';
|
|
4
5
|
|
|
5
|
-
export default
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
rscPath: '',
|
|
24
|
-
html: (
|
|
25
|
-
<Slot id="App">
|
|
26
|
-
<h3>A client element</h3>
|
|
27
|
-
</Slot>
|
|
6
|
+
export default new_defineEntries({
|
|
7
|
+
unstable_handleRequest: async (input, { renderRsc, renderHtml }) => {
|
|
8
|
+
if (input.type === 'component') {
|
|
9
|
+
return renderRsc({
|
|
10
|
+
App: (
|
|
11
|
+
<App name={input.rscPath || 'Waku'}>
|
|
12
|
+
<Children />
|
|
13
|
+
</App>
|
|
14
|
+
),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
if (input.type === 'custom' && input.pathname === '/') {
|
|
18
|
+
return renderHtml(
|
|
19
|
+
{
|
|
20
|
+
App: (
|
|
21
|
+
<App name="Waku">
|
|
22
|
+
<Children />
|
|
23
|
+
</App>
|
|
28
24
|
),
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
},
|
|
26
|
+
<Slot id="App">
|
|
27
|
+
<h3>A client element</h3>
|
|
28
|
+
</Slot>,
|
|
29
|
+
'',
|
|
30
|
+
);
|
|
32
31
|
}
|
|
33
32
|
},
|
|
34
|
-
)
|
|
33
|
+
unstable_getBuildConfig: async () => [
|
|
34
|
+
{ pathSpec: [], entries: [{ rscPath: '' }] },
|
|
35
|
+
],
|
|
36
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/entries.tsx","./src/main.tsx","./src/components/App.tsx","./src/components/Counter.tsx","./src/components/Hello.tsx"],"version":"5.
|
|
1
|
+
{"root":["./waku.config.ts","./src/entries.tsx","./src/main.tsx","./src/components/App.tsx","./src/components/Counter.tsx","./src/components/Hello.tsx"],"version":"5.7.2"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This is a temporary file while experimenting new_defineEntries
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'waku/config';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
middleware: () => [
|
|
7
|
+
import('waku/middleware/context'),
|
|
8
|
+
import('waku/middleware/dev-server'),
|
|
9
|
+
import('waku/middleware/handler'),
|
|
10
|
+
],
|
|
11
|
+
});
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
15
|
"react-wrap-balancer": "1.1.0",
|
|
16
|
-
"waku": "0.21.
|
|
16
|
+
"waku": "0.21.7"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/react": "18.3.12",
|
|
20
20
|
"@types/react-dom": "18.3.1",
|
|
21
|
-
"typescript": "5.
|
|
21
|
+
"typescript": "5.7.2"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./waku.config.ts","./src/als.ts","./src/entries.tsx","./src/main.tsx","./src/components2/App.tsx","./src/components2/ButtonClient.tsx","./src/components2/ButtonServer.tsx","./src/components2/Counter.tsx","./src/components2/TextBox.tsx","./src/components2/funcs.ts","./src/components2/funcs2.ts"],"version":"5.
|
|
1
|
+
{"root":["./waku.config.ts","./src/als.ts","./src/entries.tsx","./src/main.tsx","./src/components2/App.tsx","./src/components2/ButtonClient.tsx","./src/components2/ButtonServer.tsx","./src/components2/Counter.tsx","./src/components2/TextBox.tsx","./src/components2/funcs.ts","./src/components2/funcs2.ts"],"version":"5.7.2"}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"start": "waku start"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"react": "19.0.0-rc-
|
|
13
|
-
"react-dom": "19.0.0-rc-
|
|
14
|
-
"react-server-dom-webpack": "19.0.0-rc-
|
|
15
|
-
"waku": "0.21.
|
|
12
|
+
"react": "19.0.0-rc-7670501b-20241124",
|
|
13
|
+
"react-dom": "19.0.0-rc-7670501b-20241124",
|
|
14
|
+
"react-server-dom-webpack": "19.0.0-rc-7670501b-20241124",
|
|
15
|
+
"waku": "0.21.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/react": "18.3.12",
|
|
19
19
|
"@types/react-dom": "18.3.1",
|
|
20
|
-
"typescript": "5.
|
|
20
|
+
"typescript": "5.7.2"
|
|
21
21
|
}
|
|
22
22
|
}
|