Skip to content

Commit

Permalink
feat: add root project import in import_map
Browse files Browse the repository at this point in the history
  • Loading branch information
xstevenyung committed Jul 15, 2022
1 parent e3fefe5 commit 31ac7da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ if (useTwind) {

const importMap = {
"imports": {
"@/": "./",
"$fresh/": new URL("./", import.meta.url).href,
"preact": "https://esm.sh/preact@10.8.2",
"preact/": "https://esm.sh/preact@10.8.2/",
Expand All @@ -116,7 +117,7 @@ await Deno.writeTextFile(
let ROUTES_INDEX_TSX = `/** @jsx h */
import { h } from "preact";\n`;
if (useTwind) ROUTES_INDEX_TSX += `import { tw } from "@twind";\n`;
ROUTES_INDEX_TSX += `import Counter from "../islands/Counter.tsx";
ROUTES_INDEX_TSX += `import Counter from "@/islands/Counter.tsx";
export default function Home() {
return (
Expand Down

0 comments on commit 31ac7da

Please sign in to comment.