Skip to content

Commit

Permalink
feat: declare the type of ?render&doctype and ?hyderate&render
Browse files Browse the repository at this point in the history
  • Loading branch information
uenoB committed Aug 6, 2024
1 parent 2dada48 commit f238c07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/vite-plugin-minissg/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ declare module '*?doctype' {
export default content
}

declare module '*?render&doctype' {
const content: PromiseLike<import('./dist/index').Content>
export default content
}

declare module '*?client' {
const data: Record<string, import('./dist/index').Json>
export default data
Expand All @@ -23,3 +28,8 @@ declare module '*?hydrate' {
const component: any
export default component
}

declare module '*?hydrate&render' {
const data: Record<string, import('./dist/index').Content>
export default data
}
5 changes: 4 additions & 1 deletion template/preact/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import minissgPreact from '@minissg/render-preact'
export default defineConfig({
build: {
rollupOptions: {
input: ['./src/index.html.jsx?render', './src/browser.html.jsx?render']
input: [
'./src/index.html.jsx?render&doctype',
'./src/browser.html.jsx?render&doctype'
]
}
},
plugins: [
Expand Down

0 comments on commit f238c07

Please sign in to comment.