bemble
bemble2mo ago

No arguments passed to main when relative imports in VSCode Preview

Hi, when I bundle relative path for local preview in VSCode (the only way I found to have relative imports working), when I test my script, arguments are not passed to it. To reproduce, here is a simple script:
import { Language } from "./lib/database/types";

export async function main(languages: string[]) {
return languages ;
}
import { Language } from "./lib/database/types";

export async function main(languages: string[]) {
return languages ;
}
Create a test with parameters. Without the import and so not bundling, no issue, adding the import, not bundling, the preview can't resolve the path, and when bundling, it returns null. Am I missing something?
2 Replies
rubenf
rubenf2mo ago
Hi, we will investigate
bemble
bembleOP4w ago
Seems fixed, thanks

Did you find this page helpful?