mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
chore: add prefix to rollup errors
This commit is contained in:
parent
2ad4a81362
commit
4d4ae7a115
@ -32,7 +32,10 @@ export async function build (options: SLSOptions) {
|
|||||||
|
|
||||||
options.rollupConfig = getRollupConfig(options)
|
options.rollupConfig = getRollupConfig(options)
|
||||||
await hooks.callHook('rollup:before', options)
|
await hooks.callHook('rollup:before', options)
|
||||||
const build = await rollup(options.rollupConfig)
|
const build = await rollup(options.rollupConfig).catch((error) => {
|
||||||
|
error.message = '[serverless] Rollup Error: ' + error.message
|
||||||
|
throw error
|
||||||
|
})
|
||||||
|
|
||||||
const { output } = await build.write(options.rollupConfig.output as OutputOptions)
|
const { output } = await build.write(options.rollupConfig.output as OutputOptions)
|
||||||
const size = prettyBytes(output[0].code.length)
|
const size = prettyBytes(output[0].code.length)
|
||||||
|
Loading…
Reference in New Issue
Block a user