File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const postcssConfig = {
4040 ]
4141 }
4242} ;
43+ const isProd = process . env . NODE_ENV === 'production'
4344
4445module . exports = {
4546 plugins : [
@@ -49,17 +50,17 @@ module.exports = {
4950 new HTMLPlugin ( {
5051 template : fs . existsSync ( themedIndex ) ? themedIndex : 'src/index.template.html' ,
5152 filename : 'index.html' ,
52- inject : false
53+ inject : isProd == false // in dev mode we're not using clientManifest therefore renderScripts() is returning empty string and we need to inject scripts using HTMLPlugin
5354 } ) ,
5455 new HTMLPlugin ( {
5556 template : fs . existsSync ( themedIndex ) ? themedIndexMinimal : 'src/index.minimal.template.html' ,
5657 filename : 'index.minimal.html' ,
57- inject : false
58+ inject : isProd == false
5859 } ) ,
5960 new HTMLPlugin ( {
6061 template : fs . existsSync ( themedIndex ) ? themedIndexBasic : 'src/index.basic.template.html' ,
6162 filename : 'index.basic.html' ,
62- inject : false
63+ inject : isProd == false
6364 } )
6465 ] ,
6566 devtool : 'source-map' ,
Original file line number Diff line number Diff line change @@ -19,14 +19,6 @@ export default {
1919 }
2020 } ,
2121 beforeMount ( ) {
22- this . $bus . $on ( 'myAccount-before-updateUser' , this . onBeforeUpdateUser )
23- this . $bus . $on ( 'myAccount-before-changePassword' , this . onBeforeChangePassword )
24- } ,
25- destroyed ( ) {
26- this . $bus . $off ( 'myAccount-before-updateUser' , this . onBeforeUpdateUser )
27- this . $bus . $off ( 'myAccount-before-changePassword' , this . onBeforeChangePassword )
28- } ,
29- mounted ( ) {
3022 const usersCollection = Vue . prototype . $db . usersCollection
3123 usersCollection . getItem ( 'current-token' , ( err , token ) => {
3224 if ( err ) {
@@ -36,6 +28,12 @@ export default {
3628 this . $router . push ( '/' )
3729 }
3830 } )
31+ this . $bus . $on ( 'myAccount-before-updateUser' , this . onBeforeUpdateUser )
32+ this . $bus . $on ( 'myAccount-before-changePassword' , this . onBeforeChangePassword )
33+ } ,
34+ destroyed ( ) {
35+ this . $bus . $off ( 'myAccount-before-updateUser' , this . onBeforeUpdateUser )
36+ this . $bus . $off ( 'myAccount-before-changePassword' , this . onBeforeChangePassword )
3937 } ,
4038 methods : {
4139 onBeforeChangePassword ( passwordData ) {
You can’t perform that action at this time.
0 commit comments