feat: use import maps instead of deps files (#209)
This commit updates fresh to use import maps instead of deps files in generated projects.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
// This module adds twind support.
|
||||
|
||||
import { setup, theme } from "../deps.client.ts";
|
||||
import { RenderContext, RenderFn, virtualSheet } from "../deps.server.ts";
|
||||
import { RenderContext, RenderFn } from "$fresh/server.ts";
|
||||
import { setup, theme } from "../utils/twind.ts";
|
||||
import { virtualSheet } from "$twind/sheets";
|
||||
|
||||
const sheet = virtualSheet();
|
||||
sheet.reset();
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
/** @jsx h */
|
||||
/** @jsxFrag Fragment */
|
||||
|
||||
import {
|
||||
apply,
|
||||
asset,
|
||||
Fragment,
|
||||
h,
|
||||
Head,
|
||||
PageProps,
|
||||
tw,
|
||||
} from "../../deps.client.ts";
|
||||
import { frontMatter, gfm, Handlers } from "../../deps.server.ts";
|
||||
import { Fragment, h, Head, PageProps } from "$fresh/runtime.ts";
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { apply, tw } from "../../utils/twind.ts";
|
||||
import { frontMatter, gfm } from "../../utils/markdown.ts";
|
||||
|
||||
import DocsSidebar from "../../components/DocsSidebar.tsx";
|
||||
import Footer from "../../components/Footer.tsx";
|
||||
import NavigationBar from "../../components/NavigationBar.tsx";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { gfm, Handlers } from "../deps.server.ts";
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { gfm } from "../utils/markdown.ts";
|
||||
|
||||
// TODO(lucacasonato): hash the file and use the hash as the filename, and serve
|
||||
// with high-cacheability headers.
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
h,
|
||||
Head,
|
||||
PageProps,
|
||||
tw,
|
||||
} from "../deps.client.ts";
|
||||
} from "$fresh/runtime.ts";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
import Counter from "../islands/Counter.tsx";
|
||||
import LemonDrop from "../islands/LemonDrop.tsx";
|
||||
import Footer from "../components/Footer.tsx";
|
||||
|
||||
Reference in New Issue
Block a user