@@ -91,16 +91,16 @@ const importMap = {
9191 } as Record < string , string > ,
9292} ;
9393if ( useTwind ) {
94- importMap . imports [ "$ twind" ] = "https://esm.sh/ twind@0.16.17 " ;
95- importMap . imports [ "$ twind/ " ] = "https://esm.sh/twind@0.16.17/ " ;
96- importMap . imports [ "twind" ] = "./utils/ twind.ts " ;
94+ importMap . imports [ "@ twind" ] = "./utils/ twind.ts " ;
95+ importMap . imports [ "twind" ] = "https://esm.sh/twind@0.16.17" ;
96+ importMap . imports [ "twind/ " ] = "https://esm.sh/ twind@0.16.17/ " ;
9797}
9898const IMPORT_MAP_JSON = JSON . stringify ( importMap , null , 2 ) + "\n" ;
9999await Deno . writeTextFile ( join ( directory , "import_map.json" ) , IMPORT_MAP_JSON ) ;
100100
101101let ROUTES_INDEX_TSX = `/** @jsx h */
102102import { h } from "preact";\n` ;
103- if ( useTwind ) ROUTES_INDEX_TSX += `import { tw } from "twind";\n` ;
103+ if ( useTwind ) ROUTES_INDEX_TSX += `import { tw } from "@ twind";\n` ;
104104ROUTES_INDEX_TSX += `import Counter from "../islands/Counter.tsx";
105105
106106export default function Home() {
@@ -129,7 +129,7 @@ let ISLANDS_COUNTER_TSX = `/** @jsx h */
129129import { h } from "preact";
130130import { useState } from "preact/hooks";
131131import { IS_BROWSER } from "$fresh/runtime.ts";
132- ${ useTwind ? 'import { tw } from "twind";\n' : "" }
132+ ${ useTwind ? 'import { tw } from "@ twind";\n' : "" }
133133interface CounterProps {
134134 start: number;
135135}
@@ -222,8 +222,8 @@ await Deno.writeTextFile(
222222) ;
223223
224224const UTILS_TWIND_TS = `import { IS_BROWSER } from "$fresh/runtime.ts";
225- import { Configuration, setup } from "$ twind";
226- export * from "$ twind";
225+ import { Configuration, setup } from "twind";
226+ export * from "twind";
227227export const config: Configuration = {
228228 darkMode: "class",
229229 mode: "silent",
@@ -275,8 +275,8 @@ import manifest from "./fresh.gen.ts";
275275
276276if ( useTwind ) {
277277 MAIN_TS += `
278- import { virtualSheet } from "$ twind/sheets ";
279- import { config, setup } from "twind";
278+ import { config, setup } from "@ twind";
279+ import { virtualSheet } from "twind/sheets ";
280280
281281const sheet = virtualSheet();
282282sheet.reset();
0 commit comments