Skip to content

Commit

Permalink
fix: throw Error when can't preload CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Feb 27, 2022
1 parent 79428ad commit 7a848c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/importAnalysisBuild.ts
Expand Up @@ -75,7 +75,7 @@ function preload(baseModule: () => Promise<{}>, deps?: string[]) {
if (isCss) {
return new Promise((res, rej) => {
link.addEventListener('load', res)
link.addEventListener('error', rej)
link.addEventListener('error', () => rej(new Error(`Unable to load CSS for ${dep}`)))
})
}
})
Expand Down

0 comments on commit 7a848c7

Please sign in to comment.