File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ if (!import.meta.url.includes('node_modules')) {
77 // only available as dev dependency
88 await import ( 'source-map-support' ) . then ( ( r ) => r . default . install ( ) )
99 } catch { }
10+
11+ process . on ( 'unhandledRejection' , ( err ) => {
12+ throw new Error ( 'UNHANDLED PROMISE REJECTION' , { cause : err } )
13+ } )
1014}
1115
1216global . __vite_start_time = performance . now ( )
Original file line number Diff line number Diff line change @@ -307,7 +307,9 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
307307
308308 // warm up cache for resolved postcss config
309309 if ( config . css ?. transformer !== 'lightningcss' ) {
310- resolvePostcssConfig ( config )
310+ resolvePostcssConfig ( config ) . catch ( ( ) => {
311+ /* will be handled later */
312+ } )
311313 }
312314
313315 return {
@@ -1696,9 +1698,14 @@ async function resolvePostcssConfig(
16961698 return null
16971699 } )
16981700 // replace cached promise to result object when finished
1699- result . then ( ( resolved ) => {
1700- postcssConfigCache . set ( config , resolved )
1701- } )
1701+ result . then (
1702+ ( resolved ) => {
1703+ postcssConfigCache . set ( config , resolved )
1704+ } ,
1705+ ( ) => {
1706+ /* keep as rejected promise, will be handled later */
1707+ } ,
1708+ )
17021709 }
17031710
17041711 postcssConfigCache . set ( config , result )
You can’t perform that action at this time.
0 commit comments