#Cannot run TS in playground

1 messages · Page 1 of 1 (latest)

polar mortar
#

Here is an example I'm trying to run.

I keep getting:

[ERR]: "Executed JavaScript Failed:" 
[ERR]: Cannot use import statement outside a module 

I've tried changing the target in the config, but not matter what I try the compiled JS always has import in it.

gaunt nestBOT
#

@polar mortar Here's a shortened URL of your playground link! You can remove the full link from your message.

sillvva#0

Preview:ts ... const schema = optional(date()) ...

wanton nest
#

the playground doesn't ever run third-party packages. they're only used for type info

polar mortar
#

Oh

wanton nest
#

i think it'd open up all kinds of security issues if it did, plus it'd be kind of complicated to implement and many packages wouldn't work anyway (anything that expects a non-browser runtime for example)