File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ function rollupConfig({
85
85
// replaceConfig needs to have some values
86
86
'const polyfill = process.env.NODE_ENV === \'test\'' : 'const polyfill = true' ,
87
87
'process.env.VERSION' : `"${ version } "` ,
88
+ 'process.client' : isBrowserBuild ? 'true' : 'false' ,
88
89
'process.server' : isBrowserBuild ? 'false' : 'true' ,
89
90
/* remove unused stuff from deepmerge */
90
91
// remove react stuff from is-mergeable-object
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { setOptions } from './shared/options'
5
5
import $meta from './shared/$meta'
6
6
import generate from './server/generate'
7
7
import { hasMetaInfo } from './shared/meta-helpers'
8
+ import { isUndefined } from './utils/is-type'
8
9
9
10
/**
10
11
* Plugin install function.
@@ -25,6 +26,14 @@ function install (Vue, options) {
25
26
Vue . mixin ( createMixin ( Vue , options ) )
26
27
}
27
28
29
+ if ( process . client ) {
30
+ // automatic install
31
+ if ( ! isUndefined ( window ) && ! isUndefined ( window . Vue ) ) {
32
+ /* istanbul ignore next */
33
+ install ( window . Vue )
34
+ }
35
+ }
36
+
28
37
export default {
29
38
version,
30
39
install,
You can’t perform that action at this time.
0 commit comments