how to change solid-start build `target`?
I tried this in app.config:
but when I put a top-level
await
in a module, then npm run build
says this:
The top-level await
is working fine in npm run dev
, but I get that error only with build
.
How do we change the target
?
5 Replies
Ah, looks like I had to replace this,
with this,
which is confusing because when looking at intellisense in VS Code, it tells us that
vite.build.target
is for configuring the esbuild target:
This is not clear from the solid-start docs, I found this clue by searching Discord conversations, f.e. https://discord.com/channels/722131463138705510/1228007897506644039/1270169209246060577
@docs-team ^ docs feature request, not clear how to change the
target
, and I think it would be obvious for people to assume that vite.build.target
will control it
For now I'll leave both vite.build.target
and server.esbuild.options.target
set to esnext
, as I don't know if both are needed or not.A PR or issue to capture that would be awesome 🙂
Thanks for sharing this @Joe Pea , I just ran into this same issue
No prob!