fix build
This commit is contained in:
parent
9eee55df4a
commit
01ceb957ee
4 changed files with 11 additions and 8 deletions
|
|
@ -102,8 +102,12 @@ export const buildSwPlugin = ({ swSrc, swDest }) => {
|
|||
},
|
||||
})
|
||||
|
||||
const swBundle = await build(config)
|
||||
return swBundle.output[0]
|
||||
try {
|
||||
const swBundle = await build(config)
|
||||
return swBundle.output[0]
|
||||
} catch (e) {
|
||||
console.error('Error building ServiceWorker:' , e)
|
||||
}
|
||||
},
|
||||
},
|
||||
closeBundle: {
|
||||
|
|
@ -112,7 +116,11 @@ export const buildSwPlugin = ({ swSrc, swDest }) => {
|
|||
async handler() {
|
||||
if (process.env.VITEST) return
|
||||
console.info('Building service worker for production')
|
||||
await build(config)
|
||||
try {
|
||||
await build(config)
|
||||
} catch (e) {
|
||||
console.error('Error building ServiceWorker:' , e)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue