This repository was archived by the owner on Jan 26, 2024. It is now read-only.
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 = {
40
40
]
41
41
}
42
42
} ;
43
+ const isProd = process . env . NODE_ENV === 'production'
43
44
44
45
module . exports = {
45
46
plugins : [
@@ -49,17 +50,17 @@ module.exports = {
49
50
new HTMLPlugin ( {
50
51
template : fs . existsSync ( themedIndex ) ? themedIndex : 'src/index.template.html' ,
51
52
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
53
54
} ) ,
54
55
new HTMLPlugin ( {
55
56
template : fs . existsSync ( themedIndex ) ? themedIndexMinimal : 'src/index.minimal.template.html' ,
56
57
filename : 'index.minimal.html' ,
57
- inject : false
58
+ inject : isProd == false
58
59
} ) ,
59
60
new HTMLPlugin ( {
60
61
template : fs . existsSync ( themedIndex ) ? themedIndexBasic : 'src/index.basic.template.html' ,
61
62
filename : 'index.basic.html' ,
62
- inject : false
63
+ inject : isProd == false
63
64
} )
64
65
] ,
65
66
devtool : 'source-map' ,
Original file line number Diff line number Diff line change @@ -19,14 +19,6 @@ export default {
19
19
}
20
20
} ,
21
21
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 ( ) {
30
22
const usersCollection = Vue . prototype . $db . usersCollection
31
23
usersCollection . getItem ( 'current-token' , ( err , token ) => {
32
24
if ( err ) {
@@ -36,6 +28,12 @@ export default {
36
28
this . $router . push ( '/' )
37
29
}
38
30
} )
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 )
39
37
} ,
40
38
methods : {
41
39
onBeforeChangePassword ( passwordData ) {
You can’t perform that action at this time.
0 commit comments