laurynas
laurynas
DDeno
Created by laurynas on 4/30/2024 in #help
Loading a module with `.load_main_es_module_from_code()` and TS module loader doesn't transpile
While working on a script runtime I ran into a curious issue where the main module I load doesn't get transpiled. This may well be my lack of understanding of how deno_core crate works but the case seemed so mind boggling to me I created a small repo for reproduction. The TLDR is: 1. I have a script.ts that I load and evaluate at runtime. 2. The script.ts uses functions from a helper library script-api.ts 3. When I load the file using the .load_main_es_module_from_code method (and evaluate with .mod_evaluate and run the event loop etc etc) the helper library gets transpiled correctly, however not the main module in question.. Here's my repro repo with a passing and failing examples and a README describing the case in more detail. Would love to know what am I missing here?
3 replies