How to emit errors and fail production build if typescript compilation fails #3535
Unanswered
melink14
asked this question in
Troubleshooting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been testing out snowpack for a bit and I was surpised about how simple I could get clean modern JS output from my TS project.
One thing that I can't figure out is that even though I've installed
@snowpack/plugin-typescript
as per the docs, I can't get any typechecking when runningnpx snowpack build
. I also can't find any previous discussion or comment of this limitation so I assume I must have goofed my config somehow...I do see typescript errors when running
npx snowpack dev
or evennpx snowpack --watch
and when using--verbose
I see that there are no log lines fromsnowpack/plugin-typescript
at all.The reason this is needed is that in the presence of type errors, there's likely to be a bug in the final output and I'd like the build to fail fast in that case. (For example, as part of PR CI, a sucessful build run is required for merging)
Beta Was this translation helpful? Give feedback.
All reactions