Open d9k opened 11 months ago
If add alias as describe above deno task test
fails with:
error: AssertionError: Snapshot does not match:
[Diff] Actual / Expected
{
imports: {
+ "./client.tsx": "/client.0774b963.js",
+ "./src/app.tsx": "/src/app.4051f35a.js",
+ "./src/components/Test.tsx": "/src/components/Test.d8e044d9.js",
- "./client.tsx": "/client.eaebf466.js",
"https://deno.land/": "https://deno.land/",
"https://esm.sh/": "https://esm.sh/",
"react-dom/client": "https://esm.sh/v127/react-dom@18.2.0/es2022/client.js",
"react/jsx-runtime": "https://esm.sh/stable/react@18.2.0/es2022/jsx-runtime.js",
+ "ultra/hooks/use-asset.js": "https://deno.land/x/ultra@v2.2.1/hooks/use-asset.js",
"ultra/hydrate.js": "https://deno.land/x/ultra@v2.2.1/hydrate.js",
react: "https://esm.sh/stable/react@18.2.0/es2022/react.mjs",
+ twind: "https://esm.sh/v127/twind@0.16.17/es2022/twind.mjs",
},
scopes: {
"https://deno.land/": {
"/x/": "https://deno.land/x/",
},
"https://esm.sh/": {
"/stable/": "https://esm.sh/stable/",
"/v127/": "https://esm.sh/v127/",
},
},
}
As you see, "./src/app.tsx": "/src/app.4051f35a.js"
disappears from imports
Using root alias with Ultra build which uses
mesozoic
causes problems: `/\~/` alias + build => Module not found on runtime | issue #290 | ultra: entries for paths with aliases not created in.ultra/importMap.browser.json
andimportMap.server.json
at all!Please add root alias to fixture and resolve build errors.
For example:
importMap.json:
client.tsx, server.tsx:
replace
import App from "./src/app.tsx"
withimport App from "/~/app.tsx"
.