Azarox
Azarox
WWindmill
Created by Azarox on 10/22/2024 in #help
Multiple main in bundle relative path for preview
Sorry for the response time @rubenf , i have try with a minimal example: i can reproduce the bug in this case: script1.ts:
import * as wmill from 'windmill-client'
import { main as script2 } from './script2.ts'
import z from 'zod'

export function main(data) {
console.log(data)
console.log('script1')
}
import * as wmill from 'windmill-client'
import { main as script2 } from './script2.ts'
import z from 'zod'

export function main(data) {
console.log(data)
console.log('script1')
}
script2.ts:
import * as wmill from 'windmill-client'
import z from 'zod'

export async function main(data) {
console.log('script2', data)
}
import * as wmill from 'windmill-client'
import z from 'zod'

export async function main(data) {
console.log('script2', data)
}
i want to execute script1.ts, if i execute it with any data the console.log(data) result will be undefined, but if i comment this line: import { main as script2 } from './script2.ts' the console.log(data) will work correctly
9 replies
WWindmill
Created by Azarox on 10/22/2024 in #help
Multiple main in bundle relative path for preview
yes
9 replies
WWindmill
Created by Azarox on 10/22/2024 in #help
Multiple main in bundle relative path for preview
I have this "bug" when i import other scripts contains main() function
9 replies