File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @prefresh/vite ' : patch
3+ ' @prefresh/webpack ' : patch
4+ ---
5+
6+ Convey information when an update fails
Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ module.exports = function prefreshPlugin(options = {}) {
1010 return {
1111 name : 'prefresh' ,
1212 configResolved ( config ) {
13- shouldSkip = config . isProduction || config . command === 'build' || config . server . hmr === false ;
13+ shouldSkip =
14+ config . isProduction ||
15+ config . command === 'build' ||
16+ config . server . hmr === false ;
1417 } ,
1518 async transform ( code , id , options ) {
1619 const ssr =
@@ -91,6 +94,7 @@ module.exports = function prefreshPlugin(options = {}) {
9194 try {
9295 flushUpdates();
9396 } catch (e) {
97+ console.log('[PREFRESH] Failed to flush updates:', e);
9498 self.location.reload();
9599 }
96100 });
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ module.exports = function () {
4141 if ( moduleHot . invalidate ) {
4242 moduleHot . invalidate ( ) ;
4343 } else {
44+ console . log ( '[PREFRESH] Failed to flush updates:' , e ) ;
4445 self . location . reload ( ) ;
4546 }
4647 }
You can’t perform that action at this time.
0 commit comments