When changing the source directory, import maps needs to be in the source for the runtime to work
When changing the source directory, if the import map is still in the root, then this error will happen:
error: Uncaught (in promise) TypeError: Relative import path "typography" not prefixed with / or ./ or ../ and not in import map from "file:///D:/QC%20supplements/Code/Apps/Tr%E1%BA%A5n%20K%E1%BB%B3/Web/tailwind.config.ts"
The runtime still needs the import map in the source directory. However, for the LSP to work, a duplication of it needs to be on the root.
Related bug: https://github.com/denoland/deploy_feedback/issues/590
I can only imagine this would be an issue if you're launching the program from within the source directory. If you're launching it like this: deno run -A src/dev.ts then it should be fine. Are you saying that this isn't working?
yes. I'm on root, and the deno.jsonc in root is like this:
"tasks": {
"check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx",
"cli": "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -",
"manifest": "deno task cli manifest $(pwd)",
"start": "deno run -A --watch=static/,routes/ './Web/dev.ts'",
"build": "deno run -A './Web/dev.ts' build",
"preview": "deno run -A ./Web/main.ts",
"update": "deno run -A -r https://fresh.deno.dev/update ."
},
I only use tasks, not run the full commands directly