diff --git a/template/mdx/package.json b/template/mdx/package.json index 1e69bba..c4c1884 100644 --- a/template/mdx/package.json +++ b/template/mdx/package.json @@ -1,6 +1,9 @@ { "private": true, "type": "module", + "engines": { + "node": ">=18" + }, "scripts": { "dev": "vite", "build": "vite build", diff --git a/template/mdx/src/index.html.jsx b/template/mdx/src/index.html.jsx index ef2a158..a9e4e78 100644 --- a/template/mdx/src/index.html.jsx +++ b/template/mdx/src/index.html.jsx @@ -20,7 +20,7 @@ export const main = ({ moduleName }) => ) - return { default: render(root) } + return { default: new Blob(['', await render(root)]) } } return [relPath, { main }] }) diff --git a/template/page/package.json b/template/page/package.json index c4ab013..76af482 100644 --- a/template/page/package.json +++ b/template/page/package.json @@ -1,6 +1,9 @@ { "private": true, "type": "module", + "engines": { + "node": ">=18" + }, "scripts": { "dev": "vite", "build": "vite build", diff --git a/template/page/src/page.jsx b/template/page/src/page.jsx index d5e0266..81d5efa 100644 --- a/template/page/src/page.jsx +++ b/template/page/src/page.jsx @@ -20,6 +20,6 @@ export class Page extends PageClass { ) - return await render(html) + return new Blob(['', await render(html)]) } } diff --git a/template/react/vite.config.js b/template/react/vite.config.js index 2e22e96..61f16e8 100644 --- a/template/react/vite.config.js +++ b/template/react/vite.config.js @@ -6,7 +6,10 @@ import minissgReact from '@minissg/render-react' 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: [ diff --git a/template/solid/vite.config.js b/template/solid/vite.config.js index 1542a87..102676c 100644 --- a/template/solid/vite.config.js +++ b/template/solid/vite.config.js @@ -6,7 +6,10 @@ import minissgSolid from '@minissg/render-solid' 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: [ diff --git a/template/svelte/vite.config.js b/template/svelte/vite.config.js index 98993dc..985b774 100644 --- a/template/svelte/vite.config.js +++ b/template/svelte/vite.config.js @@ -7,8 +7,8 @@ export default defineConfig({ build: { rollupOptions: { input: [ - './src/index.html.svelte?render', - './src/browser.html.svelte?render' + './src/index.html.svelte?render&doctype', + './src/browser.html.svelte?render&doctype' ] } }, diff --git a/template/vue/vite.config.js b/template/vue/vite.config.js index d454bd2..c504804 100644 --- a/template/vue/vite.config.js +++ b/template/vue/vite.config.js @@ -8,8 +8,8 @@ export default defineConfig({ minify: true, rollupOptions: { input: { - 'index.html': './src/index-html.vue?render', - 'browser.html': './src/browser-html.vue?render' + 'index.html': './src/index-html.vue?render&doctype', + 'browser.html': './src/browser-html.vue?render&doctype' } } },