Open tiptenbrink opened 2 years ago
I've done some more digging, it seems to be caused by the following part in the [index.ts
](https://deno.land/x/zod@v3.9.8/index.ts) of zod:
import * as z from "./external.ts";
export * from "./external.ts";
export { z };
Probably the double export (which in a way export the same thing) confuses Aleph.js's bundler. I made a test repo with a working refactor of the zod contents here to illustrate the issue.
@tiptenbrink thanks, i will look into it
I was concerned about the same issue, so I tried to find the cause. And I think these lines are suspicious (although I'm not sure): https://github.com/alephjs/aleph.js/blob/93ff6f078e3c5f54db6082452e1da12cf7b02026/bundler/mod.ts#L173-L181 I will do further investigations.
P.S. In my case, the path of dependencies in https://deno.land/std@0.115.0/path/mod.ts
was somehow transformed to something like https://deno.land/std@0.115.0/path/mod.ts/common.ts
, which is wrong.
This is an error in my current project.
This only happens when running in production mode, not when using
aleph dev
. It seems like it incorrectly generated the URL to download, because if you look at the index.ts it is simply importing external.ts, there is no such thing as a index.ts directory in the module.I'm quite sure my imports are fine:
runs.ts
:import_map.json