Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/guide/pages-routing/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ You can also use your own client-side router and call Void's APIs with [typed fe

In an empty project, `void init` can set up Pages for you. Choose Vite+ or plain Vite, then React, Vue, Svelte, or Solid and a database or static starter. The generated app includes the matching Vite config and page files.

With TypeScript 7 and Vue 3.5’s default compiler, `_error.vue`, `_not-found.vue`, and regular components used by pages fail to compile when `defineProps<T>()` uses a type imported from a relative file or a package. New Vue starters default to TypeScript 6 so these imports work. In existing projects on TypeScript 7, install `typescript@6` or declare the props type in the component. [vuejs/core#15085](https://github.com/vuejs/core/pull/15085)

If you're adding Pages mode manually, install a framework adapter alongside `void`:

::: code-group
Expand Down
4 changes: 3 additions & 1 deletion packages/void/src/cli/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ export const SCAFFOLD_FRAMEWORKS: Record<ScaffoldFramework, ScaffoldFrameworkCon
dependencies: {
vue: '^3.5.30',
},
devDependencies: {},
devDependencies: {
typescript: '^6.0.3',
},
tsconfigCompilerOptions: {
jsx: 'preserve',
},
Expand Down
1 change: 1 addition & 0 deletions packages/void/test/unit/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2359,6 +2359,7 @@ describe('isScaffoldableEmptyProject', () => {
const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
expect(pkg.dependencies.vue).toBeDefined();
expect(pkg.devDependencies['@void/vue']).toBeDefined();
expect(pkg.devDependencies.typescript).toBe('^6.0.3');
expect(pkg.devDependencies.void).toBeDefined();

expect(readConfig(root)).toEqual({
Expand Down