WindmillWWindmill
Powered by
bembleB
Windmill•11mo ago•
2 replies
bemble

No arguments passed to main when relative imports in VSCode Preview

Hi, when I
bundle relative path for local preview
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?
WindmillJoin
3,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

Multiple main in bundle relative path for preview
AzaroxAAzarox / help
16mo ago
wmill sync not bundling relative imports
NackiNNacki / help
7mo ago
Cannot paste text in Windmill preview in VSCode
httpteapotHhttpteapot / help
2y ago
Failed to find relative import
EntVlEEntVl / help
14mo ago