[Nuxt] Typescript option typeCheck
breaks build because of dev
mode usage
#632
Labels
to triage
This issue needs to be triaged
Describe the bug
With nuxt version
3.8.0
, runninghistoire build
withtypeCheck: 'build'
in nuxt config, story collection fails with:Furthermore, with the fix i contributed to
nuxt
about makingvite-plugin-checker
overlay work, that landed in3.8.1
,even if it resolves the error i'm reporting here, the feature (when havingtypeCheck: true
in nuxt config) is not useful, since the errors are instantly swallowed in cli output (because story collection operates indev
mode)the same error now happens when
typeCheck: true
is set and no more whentypeCheck: 'build'
is set.Andhistoire
also features type checking, so i propose disabling it entirelyThe feature is still useful when runninghistoire dev
withtypeCheck: true
, where the errors can be shown in the console (when disabling the overlay plugin -nuxt:type-check
).So i propose to disable the overlay to avoid errors, which is a simple fix.After more investigations, trying to have the feature enabled in the right conditions (
build
, notpreview
, etc..) which is really complicated due to the wayhistoire
is architectured and knowing that a ts build will stop if it can't be compiled anyway, i think it's better to disable the feature entirely to avoid errors/inconsistencies.c.f. nuxt/nuxt#24113
c.f. nuxt/nuxt#24114
PR: #633
Reproduction
https://stackblitz.com/edit/histoire-nuxt3-starter-eb2jnf-3tkfwq?file=package.json,nuxt.config.ts,.stackblitzrc
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: