fix: runtimeJS support on windows (#64)

This commit is contained in:
Sylvain Cau
2021-09-28 18:36:41 +02:00
committed by GitHub
parent 5bc35b8b95
commit 044da54513
2 changed files with 15 additions and 6 deletions
+4 -1
View File
@@ -64,7 +64,7 @@ async function init(directory: string) {
)}";\n`;
await Deno.writeTextFile(join(directory, "deps.ts"), DEPS_TS);
const PAGES_INDEX_TSX = `/** @jsx h */
import { h, IS_BROWSER, useState } from "../deps.ts";
import { h, IS_BROWSER, PageConfig, useState } from "../deps.ts";
export default function Home() {
return (
@@ -93,6 +93,9 @@ function Counter() {
</div>
);
}
export const config: PageConfig = { runtimeJS: true };
`;
await Deno.writeTextFile(
join(directory, "pages", "index.tsx"),