feat: support embedded import map in deno.json (#1188)

One can now inline the `imports` and `scopes` from the import map directly into deno.json.

For new projects, `import_map.json` is not generated anymore.

Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
Asher Gomez
2023-06-03 10:46:40 +02:00
committed by GitHub
co-authored by Luca Casonato
parent 3857a49f1c
commit 1b6678951a
34 changed files with 149 additions and 197 deletions
+6 -1
View File
@@ -1,6 +1,11 @@
{
"lock": false,
"importMap": "./import_map.json",
"imports": {
"$fresh/": "../../",
"preact": "https://esm.sh/preact@10.15.1",
"preact/": "https://esm.sh/preact@10.15.1/",
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.0.3"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
-2
View File
@@ -2,7 +2,6 @@
// This file SHOULD be checked into source version control.
// This file is automatically updated during development when running `dev.ts`.
import config from "./deno.json" assert { type: "json" };
import * as $0 from "./routes/static.tsx";
import * as $1 from "./routes/with-island.tsx";
import * as $$0 from "./islands/Island.tsx";
@@ -16,7 +15,6 @@ const manifest = {
"./islands/Island.tsx": $$0,
},
baseUrl: import.meta.url,
config,
};
export default manifest;
-8
View File
@@ -1,8 +0,0 @@
{
"imports": {
"$fresh/": "../../",
"preact": "https://esm.sh/preact@10.15.1",
"preact/": "https://esm.sh/preact@10.15.1/",
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.0.3"
}
}