File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,47 @@ var hot = false;
13
13
var initial = true ;
14
14
var currentHash = "" ;
15
15
16
+ var onSocketMsg = {
17
+ hot : function ( ) {
18
+ hot = true ;
19
+ console . log ( "[WDS] Hot Module Replacement enabled." ) ;
20
+ } ,
21
+ invalid : function ( ) {
22
+ console . log ( "[WDS] App updated. Recompiling..." ) ;
23
+ } ,
24
+ hash : function ( hash ) {
25
+ currentHash = hash ;
26
+ } ,
27
+ "still-ok" : function ( ) {
28
+ console . log ( "[WDS] Nothing changed." )
29
+ } ,
30
+ ok : function ( ) {
31
+ if ( initial ) return initial = false ;
32
+ reloadApp ( ) ;
33
+ } ,
34
+ warnings : function ( warnings ) {
35
+ console . log ( "[WDS] Warnings while compiling." ) ;
36
+ for ( var i = 0 ; i < warnings . length ; i ++ )
37
+ console . warn ( stripAnsi ( warnings [ i ] ) ) ;
38
+ if ( initial ) return initial = false ;
39
+ reloadApp ( ) ;
40
+ } ,
41
+ errors : function ( errors ) {
42
+ console . log ( "[WDS] Errors while compiling." ) ;
43
+ for ( var i = 0 ; i < errors . length ; i ++ )
44
+ console . error ( stripAnsi ( errors [ i ] ) ) ;
45
+ if ( initial ) return initial = false ;
46
+ reloadApp ( ) ;
47
+ } ,
48
+ "proxy-error" : function ( errors ) {
49
+ console . log ( "[WDS] Proxy error." ) ;
50
+ for ( var i = 0 ; i < errors . length ; i ++ )
51
+ console . error ( stripAnsi ( errors [ i ] ) ) ;
52
+ if ( initial ) return initial = false ;
53
+ reloadApp ( ) ;
54
+ }
55
+ } ;
56
+
16
57
var newConnection = function ( ) {
17
58
sock = new SockJS ( url . format ( {
18
59
protocol : urlParts . protocol ,
You can’t perform that action at this time.
0 commit comments