mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(nuxt-ts): error catch in nuxt-ts binary (#5086)
* fix: nuxt-ts binary error catch * test: update cli snapshot
This commit is contained in:
parent
4b82aa9d84
commit
4f887f6963
@ -11,9 +11,11 @@ const tsConfigPath = resolve(rootDir, 'tsconfig.json')
|
||||
|
||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||
|
||||
require('@nuxt/typescript' + suffix).setup(tsConfigPath).then(() => {
|
||||
require('@nuxt/cli' + suffix).run()
|
||||
}).catch((error) => {
|
||||
const errorHandler = (error) => {
|
||||
require('consola').fatal(error)
|
||||
process.exit(2)
|
||||
})
|
||||
}
|
||||
|
||||
require('@nuxt/typescript' + suffix).setup(tsConfigPath).then(() => {
|
||||
require('@nuxt/cli' + suffix).run().catch(errorHandler)
|
||||
}).catch(errorHandler)
|
||||
|
Loading…
Reference in New Issue
Block a user