create-vite-extra 2.4.1 → 3.0.1

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.
Files changed (126) hide show
  1. package/README.md +1 -1
  2. package/index.js +3 -4
  3. package/package.json +3 -3
  4. package/template-deno-lit/deno.json +2 -2
  5. package/template-deno-lit/src/index.css +1 -1
  6. package/template-deno-lit-ts/deno.json +2 -2
  7. package/template-deno-lit-ts/src/index.css +1 -1
  8. package/template-deno-lit-ts/src/my-element.ts +0 -1
  9. package/template-deno-preact/deno.json +4 -4
  10. package/template-deno-preact/src/index.css +1 -1
  11. package/template-deno-preact-ts/deno.json +4 -4
  12. package/template-deno-preact-ts/src/app.tsx +0 -1
  13. package/template-deno-preact-ts/src/index.css +1 -1
  14. package/template-deno-react/deno.json +7 -7
  15. package/template-deno-react/src/App.jsx +0 -1
  16. package/template-deno-react/src/index.css +1 -1
  17. package/template-deno-react/src/main.jsx +0 -2
  18. package/template-deno-react-ts/deno.json +7 -7
  19. package/template-deno-react-ts/src/App.tsx +0 -2
  20. package/template-deno-react-ts/src/index.css +1 -1
  21. package/template-deno-react-ts/src/main.tsx +0 -2
  22. package/template-deno-solid/deno.json +4 -4
  23. package/template-deno-solid/src/index.css +1 -1
  24. package/template-deno-solid-ts/deno.json +4 -4
  25. package/template-deno-solid-ts/src/App.tsx +0 -1
  26. package/template-deno-solid-ts/src/index.css +1 -1
  27. package/template-deno-svelte/deno.json +4 -4
  28. package/template-deno-svelte/src/app.css +1 -1
  29. package/template-deno-svelte-ts/deno.json +4 -4
  30. package/template-deno-svelte-ts/src/app.css +1 -1
  31. package/template-deno-vanilla/deno.json +2 -2
  32. package/template-deno-vanilla/index.html +1 -1
  33. package/template-deno-vanilla/{style.css → src/style.css} +1 -1
  34. package/template-deno-vanilla-ts/deno.json +2 -2
  35. package/template-deno-vanilla-ts/src/style.css +1 -1
  36. package/template-deno-vue/deno.json +4 -4
  37. package/template-deno-vue/src/style.css +1 -1
  38. package/template-deno-vue-ts/deno.json +4 -4
  39. package/template-deno-vue-ts/src/style.css +1 -1
  40. package/template-library/package.json +1 -1
  41. package/template-library/style.css +1 -1
  42. package/template-library-ts/package.json +2 -2
  43. package/template-library-ts/src/style.css +1 -1
  44. package/template-library-ts/tsconfig.json +1 -1
  45. package/template-ssr-preact/package.json +7 -7
  46. package/template-ssr-preact/server.js +4 -4
  47. package/template-ssr-preact/src/entry-server.jsx +4 -1
  48. package/template-ssr-preact/src/index.css +1 -1
  49. package/template-ssr-preact-ts/package.json +9 -9
  50. package/template-ssr-preact-ts/server.js +4 -4
  51. package/template-ssr-preact-ts/src/entry-server.tsx +1 -1
  52. package/template-ssr-preact-ts/src/index.css +1 -1
  53. package/template-ssr-preact-ts/tsconfig.json +1 -1
  54. package/template-ssr-preact-ts/tsconfig.node.json +1 -1
  55. package/template-ssr-react/package.json +9 -9
  56. package/template-ssr-react/server.js +4 -4
  57. package/template-ssr-react/src/entry-server.jsx +4 -1
  58. package/template-ssr-react/src/index.css +1 -1
  59. package/template-ssr-react-streaming/package.json +7 -7
  60. package/template-ssr-react-streaming/server.js +4 -4
  61. package/template-ssr-react-streaming/src/entry-server.jsx +2 -3
  62. package/template-ssr-react-streaming/src/index.css +1 -1
  63. package/template-ssr-react-streaming-ts/package.json +11 -11
  64. package/template-ssr-react-streaming-ts/server.js +4 -4
  65. package/template-ssr-react-streaming-ts/src/entry-server.tsx +1 -5
  66. package/template-ssr-react-streaming-ts/src/index.css +1 -1
  67. package/template-ssr-react-streaming-ts/tsconfig.json +1 -1
  68. package/template-ssr-react-streaming-ts/tsconfig.node.json +1 -1
  69. package/template-ssr-react-ts/package.json +11 -11
  70. package/template-ssr-react-ts/server.js +4 -4
  71. package/template-ssr-react-ts/src/entry-server.tsx +1 -1
  72. package/template-ssr-react-ts/src/index.css +1 -1
  73. package/template-ssr-react-ts/tsconfig.json +1 -1
  74. package/template-ssr-react-ts/tsconfig.node.json +1 -1
  75. package/template-ssr-solid/package.json +6 -6
  76. package/template-ssr-solid/server.js +4 -4
  77. package/template-ssr-solid/src/entry-server.jsx +4 -1
  78. package/template-ssr-solid/src/index.css +1 -1
  79. package/template-ssr-solid-ts/package.json +7 -7
  80. package/template-ssr-solid-ts/server.js +4 -4
  81. package/template-ssr-solid-ts/src/entry-server.tsx +1 -1
  82. package/template-ssr-solid-ts/src/index.css +1 -1
  83. package/template-ssr-solid-ts/tsconfig.json +1 -1
  84. package/template-ssr-solid-ts/tsconfig.node.json +1 -1
  85. package/template-ssr-svelte/jsconfig.json +1 -1
  86. package/template-ssr-svelte/package.json +6 -6
  87. package/template-ssr-svelte/server.js +4 -4
  88. package/template-ssr-svelte/src/app.css +1 -1
  89. package/template-ssr-svelte/src/entry-server.js +4 -1
  90. package/template-ssr-svelte-ts/package.json +10 -10
  91. package/template-ssr-svelte-ts/server.js +4 -4
  92. package/template-ssr-svelte-ts/src/app.css +1 -1
  93. package/template-ssr-svelte-ts/src/entry-server.ts +1 -1
  94. package/template-ssr-svelte-ts/tsconfig.node.json +1 -1
  95. package/template-ssr-transform/package.json +1 -1
  96. package/template-ssr-vanilla/package.json +4 -4
  97. package/template-ssr-vanilla/server.js +4 -4
  98. package/template-ssr-vanilla/src/entry-server.js +4 -1
  99. package/template-ssr-vanilla/src/style.css +1 -1
  100. package/template-ssr-vanilla-ts/package.json +6 -6
  101. package/template-ssr-vanilla-ts/server.js +4 -4
  102. package/template-ssr-vanilla-ts/src/entry-server.ts +1 -1
  103. package/template-ssr-vanilla-ts/src/style.css +1 -1
  104. package/template-ssr-vanilla-ts/tsconfig.json +1 -1
  105. package/template-ssr-vue/package.json +6 -6
  106. package/template-ssr-vue/server.js +4 -4
  107. package/template-ssr-vue/src/entry-server.js +4 -1
  108. package/template-ssr-vue/src/style.css +1 -1
  109. package/template-ssr-vue-streaming/package.json +6 -6
  110. package/template-ssr-vue-streaming/server.js +4 -4
  111. package/template-ssr-vue-streaming/src/entry-server.js +4 -1
  112. package/template-ssr-vue-streaming/src/style.css +1 -1
  113. package/template-ssr-vue-streaming-ts/package.json +9 -9
  114. package/template-ssr-vue-streaming-ts/server.js +4 -4
  115. package/template-ssr-vue-streaming-ts/src/entry-server.ts +1 -1
  116. package/template-ssr-vue-streaming-ts/src/style.css +1 -1
  117. package/template-ssr-vue-streaming-ts/tsconfig.node.json +1 -1
  118. package/template-ssr-vue-ts/package.json +9 -9
  119. package/template-ssr-vue-ts/server.js +4 -4
  120. package/template-ssr-vue-ts/src/entry-server.ts +1 -1
  121. package/template-ssr-vue-ts/src/style.css +1 -1
  122. package/template-ssr-vue-ts/tsconfig.node.json +1 -1
  123. package/template-deno-svelte/jsconfig.json +0 -34
  124. /package/template-deno-vanilla/{counter.js → src/counter.js} +0 -0
  125. /package/template-deno-vanilla/{javascript.svg → src/javascript.svg} +0 -0
  126. /package/template-deno-vanilla/{main.js → src/main.js} +0 -0
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ## Scaffolding Your First Vite Project
4
4
 
5
5
  > **Compatibility Note:**
6
- > Vite requires [Node.js](https://nodejs.org/en/) version 14.18+, 16+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
6
+ > Vite requires [Node.js](https://nodejs.org/en/) version 18+, 20+, 22+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
7
7
 
8
8
  With NPM:
9
9
 
package/index.js CHANGED
@@ -350,8 +350,7 @@ async function init() {
350
350
  const argTemplate = argv.template || argv.t
351
351
 
352
352
  const defaultTargetDir = 'vite-project'
353
- const getProjectName = () =>
354
- targetDir === '.' ? path.basename(path.resolve()) : targetDir
353
+ const getProjectName = () => path.basename(path.resolve(targetDir))
355
354
 
356
355
  let result = {}
357
356
 
@@ -640,14 +639,14 @@ function setupReactSwc(root, { isTs, isDeno }) {
640
639
  editFile(path.resolve(root, 'deno.json'), (content) => {
641
640
  return content.replace(
642
641
  /"@vitejs\/plugin-react": ".+?"/,
643
- `"@vitejs/plugin-react-swc": "npm:@vitejs/plugin-react-swc@^3.7.1"`,
642
+ `"@vitejs/plugin-react-swc": "npm:@vitejs/plugin-react-swc@^3.8.0"`,
644
643
  )
645
644
  })
646
645
  } else {
647
646
  editFile(path.resolve(root, 'package.json'), (content) => {
648
647
  return content.replace(
649
648
  /"@vitejs\/plugin-react": ".+?"/,
650
- `"@vitejs/plugin-react-swc": "^3.7.1"`,
649
+ `"@vitejs/plugin-react-swc": "^3.8.0"`,
651
650
  )
652
651
  })
653
652
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vite-extra",
3
- "version": "2.4.1",
3
+ "version": "3.0.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Bjorn Lu",
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "main": "index.js",
20
20
  "engines": {
21
- "node": "^18.0.0 || >=20.0.0"
21
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
@@ -34,7 +34,7 @@
34
34
  "prompts": "^2.4.2"
35
35
  },
36
36
  "devDependencies": {
37
- "prettier": "^3.3.3"
37
+ "prettier": "^3.5.1"
38
38
  },
39
39
  "scripts": {
40
40
  "format": "prettier --write .",
@@ -7,8 +7,8 @@
7
7
  "lib": ["ES2020", "DOM", "DOM.Iterable"]
8
8
  },
9
9
  "imports": {
10
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
10
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
11
11
  "lit": "npm:lit@^3.2.1",
12
- "vite": "npm:vite@^5.4.9"
12
+ "vite": "npm:vite@^6.1.1"
13
13
  }
14
14
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -8,8 +8,8 @@
8
8
  "experimentalDecorators": true
9
9
  },
10
10
  "imports": {
11
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
11
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
12
12
  "lit": "npm:lit@^3.2.1",
13
- "vite": "npm:vite@^5.4.9"
13
+ "vite": "npm:vite@^6.1.1"
14
14
  }
15
15
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -1,6 +1,5 @@
1
1
  import { LitElement, css, html } from 'lit'
2
2
  import { customElement, property } from 'lit/decorators.js'
3
- // @ts-expect-error Unable to infer type at the moment
4
3
  import litLogo from './assets/lit.svg'
5
4
 
6
5
  /**
@@ -11,9 +11,9 @@
11
11
  "jsxImportSource": "preact"
12
12
  },
13
13
  "imports": {
14
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
15
- "@preact/preset-vite": "npm:@preact/preset-vite@^2.9.1",
16
- "preact": "npm:preact@^10.24.3",
17
- "vite": "npm:vite@^5.4.9"
14
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
15
+ "@preact/preset-vite": "npm:@preact/preset-vite@^2.10.1",
16
+ "preact": "npm:preact@^10.26.2",
17
+ "vite": "npm:vite@^6.1.1"
18
18
  }
19
19
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -11,9 +11,9 @@
11
11
  "jsxImportSource": "preact"
12
12
  },
13
13
  "imports": {
14
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
15
- "@preact/preset-vite": "npm:@preact/preset-vite@^2.9.1",
16
- "preact": "npm:preact@^10.24.3",
17
- "vite": "npm:vite@^5.4.9"
14
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
15
+ "@preact/preset-vite": "npm:@preact/preset-vite@^2.10.1",
16
+ "preact": "npm:preact@^10.26.2",
17
+ "vite": "npm:vite@^6.1.1"
18
18
  }
19
19
  }
@@ -1,6 +1,5 @@
1
1
  import './app.css'
2
2
  import { useState } from 'preact/hooks'
3
- // @ts-expect-error Unable to infer type at the moment
4
3
  import preactLogo from './assets/preact.svg'
5
4
 
6
5
  export function App() {
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -12,12 +12,12 @@
12
12
  "jsxImportSourceTypes": "@types/react"
13
13
  },
14
14
  "imports": {
15
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
16
- "@types/react": "npm:@types/react@^18.3.11",
17
- "@types/react-dom": "npm:@types/react-dom@^18.3.1",
18
- "@vitejs/plugin-react": "npm:@vitejs/plugin-react@^4.3.3",
19
- "react": "npm:react@^18.3.1",
20
- "react-dom": "npm:react-dom@^18.3.1",
21
- "vite": "npm:vite@^5.4.9"
15
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
16
+ "@types/react": "npm:@types/react@^19.0.10",
17
+ "@types/react-dom": "npm:@types/react-dom@^19.0.4",
18
+ "@vitejs/plugin-react": "npm:@vitejs/plugin-react@^4.3.4",
19
+ "react": "npm:react@^19.0.0",
20
+ "react-dom": "npm:react-dom@^19.0.0",
21
+ "vite": "npm:vite@^6.1.1"
22
22
  }
23
23
  }
@@ -1,5 +1,4 @@
1
1
  import './App.css'
2
- // @deno-types="@types/react"
3
2
  import { useState } from 'react'
4
3
  import reactLogo from './assets/react.svg'
5
4
 
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -1,7 +1,5 @@
1
1
  import './index.css'
2
- // @deno-types="@types/react"
3
2
  import { StrictMode } from 'react'
4
- // @deno-types="@types/react-dom/client"
5
3
  import { createRoot } from 'react-dom/client'
6
4
  import App from './App.jsx'
7
5
 
@@ -12,12 +12,12 @@
12
12
  "jsxImportSourceTypes": "@types/react"
13
13
  },
14
14
  "imports": {
15
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
16
- "@types/react": "npm:@types/react@^18.3.11",
17
- "@types/react-dom": "npm:@types/react-dom@^18.3.1",
18
- "@vitejs/plugin-react": "npm:@vitejs/plugin-react@^4.3.3",
19
- "react": "npm:react@^18.3.1",
20
- "react-dom": "npm:react-dom@^18.3.1",
21
- "vite": "npm:vite@^5.4.9"
15
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
16
+ "@types/react": "npm:@types/react@^19.0.10",
17
+ "@types/react-dom": "npm:@types/react-dom@^19.0.4",
18
+ "@vitejs/plugin-react": "npm:@vitejs/plugin-react@^4.3.4",
19
+ "react": "npm:react@^19.0.0",
20
+ "react-dom": "npm:react-dom@^19.0.0",
21
+ "vite": "npm:vite@^6.1.1"
22
22
  }
23
23
  }
@@ -1,7 +1,5 @@
1
1
  import './App.css'
2
- // @deno-types="@types/react"
3
2
  import { useState } from 'react'
4
- // @ts-expect-error Unable to infer type at the moment
5
3
  import reactLogo from './assets/react.svg'
6
4
 
7
5
  function App() {
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -1,7 +1,5 @@
1
1
  import './index.css'
2
- // @deno-types="@types/react"
3
2
  import { StrictMode } from 'react'
4
- // @deno-types="@types/react-dom/client"
5
3
  import { createRoot } from 'react-dom/client'
6
4
  import App from './App.tsx'
7
5
 
@@ -11,9 +11,9 @@
11
11
  "jsxImportSource": "solid-js"
12
12
  },
13
13
  "imports": {
14
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
15
- "solid-js": "npm:solid-js@^1.9.2",
16
- "vite": "npm:vite@^5.4.9",
17
- "vite-plugin-solid": "npm:vite-plugin-solid@^2.10.2"
14
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
15
+ "solid-js": "npm:solid-js@^1.9.4",
16
+ "vite": "npm:vite@^6.1.1",
17
+ "vite-plugin-solid": "npm:vite-plugin-solid@^2.11.2"
18
18
  }
19
19
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -11,9 +11,9 @@
11
11
  "jsxImportSource": "solid-js"
12
12
  },
13
13
  "imports": {
14
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
15
- "solid-js": "npm:solid-js@^1.9.2",
16
- "vite": "npm:vite@^5.4.9",
17
- "vite-plugin-solid": "npm:vite-plugin-solid@^2.10.2"
14
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
15
+ "solid-js": "npm:solid-js@^1.9.4",
16
+ "vite": "npm:vite@^6.1.1",
17
+ "vite-plugin-solid": "npm:vite-plugin-solid@^2.11.2"
18
18
  }
19
19
  }
@@ -1,6 +1,5 @@
1
1
  import './App.css'
2
2
  import { createSignal } from 'solid-js'
3
- // @ts-expect-error Unable to infer type at the moment
4
3
  import solidLogo from './assets/solid.svg'
5
4
 
6
5
  function App() {
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -9,9 +9,9 @@
9
9
  "lib": ["ES2020", "DOM", "DOM.Iterable"]
10
10
  },
11
11
  "imports": {
12
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
13
- "@sveltejs/vite-plugin-svelte": "npm:@sveltejs/vite-plugin-svelte@^4.0.0",
14
- "svelte": "npm:svelte@^5.0.3",
15
- "vite": "npm:vite@^5.4.9"
12
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
13
+ "@sveltejs/vite-plugin-svelte": "npm:@sveltejs/vite-plugin-svelte@^5.0.3",
14
+ "svelte": "npm:svelte@^5.20.2",
15
+ "vite": "npm:vite@^6.1.1"
16
16
  }
17
17
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -9,9 +9,9 @@
9
9
  "lib": ["ES2020", "DOM", "DOM.Iterable"]
10
10
  },
11
11
  "imports": {
12
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
13
- "@sveltejs/vite-plugin-svelte": "npm:@sveltejs/vite-plugin-svelte@^4.0.0",
14
- "svelte": "npm:svelte@^5.0.3",
15
- "vite": "npm:vite@^5.4.9"
12
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
13
+ "@sveltejs/vite-plugin-svelte": "npm:@sveltejs/vite-plugin-svelte@^5.0.3",
14
+ "svelte": "npm:svelte@^5.20.2",
15
+ "vite": "npm:vite@^6.1.1"
16
16
  }
17
17
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -9,7 +9,7 @@
9
9
  "lib": ["ES2020", "DOM", "DOM.Iterable"]
10
10
  },
11
11
  "imports": {
12
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
13
- "vite": "npm:vite@^5.4.9"
12
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
13
+ "vite": "npm:vite@^6.1.1"
14
14
  }
15
15
  }
@@ -8,6 +8,6 @@
8
8
  </head>
9
9
  <body>
10
10
  <div id="app"></div>
11
- <script type="module" src="/main.js"></script>
11
+ <script type="module" src="/src/main.js"></script>
12
12
  </body>
13
13
  </html>
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -9,7 +9,7 @@
9
9
  "lib": ["ES2020", "DOM", "DOM.Iterable"]
10
10
  },
11
11
  "imports": {
12
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
13
- "vite": "npm:vite@^5.4.9"
12
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
13
+ "vite": "npm:vite@^6.1.1"
14
14
  }
15
15
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -9,9 +9,9 @@
9
9
  "lib": ["ES2020", "DOM", "DOM.Iterable"]
10
10
  },
11
11
  "imports": {
12
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
13
- "@vitejs/plugin-vue": "npm:@vitejs/plugin-vue@^5.1.4",
14
- "vite": "npm:vite@^5.4.9",
15
- "vue": "npm:vue@^3.5.12"
12
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
13
+ "@vitejs/plugin-vue": "npm:@vitejs/plugin-vue@^5.2.1",
14
+ "vite": "npm:vite@^6.1.1",
15
+ "vue": "npm:vue@^3.5.13"
16
16
  }
17
17
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -9,9 +9,9 @@
9
9
  "lib": ["ES2020", "DOM", "DOM.Iterable"]
10
10
  },
11
11
  "imports": {
12
- "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.0",
13
- "@vitejs/plugin-vue": "npm:@vitejs/plugin-vue@^5.1.4",
14
- "vite": "npm:vite@^5.4.9",
15
- "vue": "npm:vue@^3.5.12"
12
+ "@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
13
+ "@vitejs/plugin-vue": "npm:@vitejs/plugin-vue@^5.2.1",
14
+ "vite": "npm:vite@^6.1.1",
15
+ "vue": "npm:vue@^3.5.13"
16
16
  }
17
17
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -20,6 +20,6 @@
20
20
  "build": "vite build"
21
21
  },
22
22
  "devDependencies": {
23
- "vite": "^5.4.9"
23
+ "vite": "^6.1.1"
24
24
  }
25
25
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -20,7 +20,7 @@
20
20
  "build": "tsc && vite build"
21
21
  },
22
22
  "devDependencies": {
23
- "typescript": "~5.6.3",
24
- "vite": "^5.4.9"
23
+ "typescript": "~5.7.3",
24
+ "vite": "^6.1.1"
25
25
  }
26
26
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -7,7 +7,7 @@
7
7
  "skipLibCheck": true,
8
8
 
9
9
  /* Bundler mode */
10
- "moduleResolution": "Bundler",
10
+ "moduleResolution": "bundler",
11
11
  "allowImportingTsExtensions": true,
12
12
  "isolatedModules": true,
13
13
  "moduleDetection": "force",
@@ -6,20 +6,20 @@
6
6
  "scripts": {
7
7
  "dev": "node server",
8
8
  "build": "npm run build:client && npm run build:server",
9
- "build:client": "vite build --ssrManifest --outDir dist/client",
9
+ "build:client": "vite build --outDir dist/client",
10
10
  "build:server": "vite build --ssr src/entry-server.jsx --outDir dist/server",
11
11
  "preview": "cross-env NODE_ENV=production node server"
12
12
  },
13
13
  "dependencies": {
14
- "compression": "^1.7.4",
14
+ "compression": "^1.8.0",
15
15
  "express": "^5.0.1",
16
- "preact": "^10.24.3",
17
- "preact-render-to-string": "^6.5.11",
18
- "sirv": "^3.0.0"
16
+ "preact": "^10.26.2",
17
+ "preact-render-to-string": "^6.5.13",
18
+ "sirv": "^3.0.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@preact/preset-vite": "^2.9.1",
21
+ "@preact/preset-vite": "^2.10.1",
22
22
  "cross-env": "^7.0.3",
23
- "vite": "^5.4.9"
23
+ "vite": "^6.1.1"
24
24
  }
25
25
  }
@@ -10,14 +10,12 @@ const base = process.env.BASE || '/'
10
10
  const templateHtml = isProduction
11
11
  ? await fs.readFile('./dist/client/index.html', 'utf-8')
12
12
  : ''
13
- const ssrManifest = isProduction
14
- ? await fs.readFile('./dist/client/.vite/ssr-manifest.json', 'utf-8')
15
- : undefined
16
13
 
17
14
  // Create http server
18
15
  const app = express()
19
16
 
20
17
  // Add Vite or respective production middlewares
18
+ /** @type {import('vite').ViteDevServer | undefined} */
21
19
  let vite
22
20
  if (!isProduction) {
23
21
  const { createServer } = await import('vite')
@@ -39,7 +37,9 @@ app.use('*all', async (req, res) => {
39
37
  try {
40
38
  const url = req.originalUrl.replace(base, '')
41
39
 
40
+ /** @type {string} */
42
41
  let template
42
+ /** @type {import('./src/entry-server.js').render} */
43
43
  let render
44
44
  if (!isProduction) {
45
45
  // Always read fresh template in development
@@ -51,7 +51,7 @@ app.use('*all', async (req, res) => {
51
51
  render = (await import('./dist/server/entry-server.js')).render
52
52
  }
53
53
 
54
- const rendered = await render(url, ssrManifest)
54
+ const rendered = await render(url)
55
55
 
56
56
  const html = template
57
57
  .replace(`<!--app-head-->`, rendered.head ?? '')
@@ -1,7 +1,10 @@
1
1
  import renderToString from 'preact-render-to-string'
2
2
  import { App } from './app'
3
3
 
4
- export function render() {
4
+ /**
5
+ * @param {string} _url
6
+ */
7
+ export function render(_url) {
5
8
  const html = renderToString(<App />)
6
9
  return { html }
7
10
  }
@@ -1,5 +1,5 @@
1
1
  :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
3
  line-height: 1.5;
4
4
  font-weight: 400;
5
5
 
@@ -6,23 +6,23 @@
6
6
  "scripts": {
7
7
  "dev": "node server",
8
8
  "build": "npm run build:client && npm run build:server",
9
- "build:client": "vite build --ssrManifest --outDir dist/client",
9
+ "build:client": "vite build --outDir dist/client",
10
10
  "build:server": "vite build --ssr src/entry-server.tsx --outDir dist/server",
11
11
  "preview": "cross-env NODE_ENV=production node server"
12
12
  },
13
13
  "dependencies": {
14
- "compression": "^1.7.4",
14
+ "compression": "^1.8.0",
15
15
  "express": "^5.0.1",
16
- "preact": "^10.24.3",
17
- "preact-render-to-string": "^6.5.11",
18
- "sirv": "^3.0.0"
16
+ "preact": "^10.26.2",
17
+ "preact-render-to-string": "^6.5.13",
18
+ "sirv": "^3.0.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@preact/preset-vite": "^2.9.1",
21
+ "@preact/preset-vite": "^2.10.1",
22
22
  "@types/express": "^5.0.0",
23
- "@types/node": "^22.7.7",
23
+ "@types/node": "^22.13.4",
24
24
  "cross-env": "^7.0.3",
25
- "typescript": "~5.6.3",
26
- "vite": "^5.4.9"
25
+ "typescript": "~5.7.3",
26
+ "vite": "^6.1.1"
27
27
  }
28
28
  }