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,5 +1,6 @@
|
||||
{
|
||||
"tasks": {
|
||||
"start": "deno run -A --watch main.ts & deno run -A ../../cli.ts manifest --watch"
|
||||
}
|
||||
},
|
||||
"importMap": "./import_map.json"
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * from "../../runtime.ts";
|
||||
@@ -1 +0,0 @@
|
||||
export * from "../../server.ts";
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"imports": {
|
||||
"$fresh/": "../../"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/** @jsx h */
|
||||
import { h, IS_BROWSER, useState } from "../deps.client.ts";
|
||||
import { h, IS_BROWSER, useState } from "$fresh/runtime.ts";
|
||||
|
||||
interface CounterProps {
|
||||
start: number;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// <reference lib="deno.ns" />
|
||||
/// <reference lib="deno.unstable" />
|
||||
|
||||
import { start } from "./deps.server.ts";
|
||||
import { start } from "$fresh/server.ts";
|
||||
import manifest from "./fresh.gen.ts";
|
||||
|
||||
await start(manifest);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** @jsx h */
|
||||
import { h } from "../deps.client.ts";
|
||||
import { h } from "$fresh/runtime.ts";
|
||||
import Counter from "../islands/Counter.tsx";
|
||||
|
||||
export default function Home() {
|
||||
|
||||
Reference in New Issue
Block a user