File tree 2 files changed +17
-4
lines changed
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ test('api: extendPackage', async () => {
49
49
list : [ 1 ] ,
50
50
vue : {
51
51
foo : 1 ,
52
- bar : 2
52
+ bar : 2 ,
53
+ pluginOptions : {
54
+ graphqlMock : true ,
55
+ apolloEngine : false
56
+ }
53
57
}
54
58
} ,
55
59
plugins : [ {
@@ -60,7 +64,10 @@ test('api: extendPackage', async () => {
60
64
list : [ 2 ] ,
61
65
vue : {
62
66
foo : 2 ,
63
- baz : 3
67
+ baz : 3 ,
68
+ pluginOptions : {
69
+ enableInSFC : true
70
+ }
64
71
}
65
72
} )
66
73
}
@@ -76,7 +83,12 @@ test('api: extendPackage', async () => {
76
83
vue : {
77
84
foo : 2 ,
78
85
bar : 2 ,
79
- baz : 3
86
+ baz : 3 ,
87
+ pluginOptions : {
88
+ graphqlMock : true ,
89
+ apolloEngine : false ,
90
+ enableInSFC : true
91
+ }
80
92
}
81
93
} )
82
94
} )
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const fs = require('fs')
2
2
const ejs = require ( 'ejs' )
3
3
const path = require ( 'path' )
4
4
const globby = require ( 'globby' )
5
+ const merge = require ( 'deepmerge' )
5
6
const resolve = require ( 'resolve' )
6
7
const isBinary = require ( 'isbinaryfile' )
7
8
const yaml = require ( 'yaml-front-matter' )
@@ -105,7 +106,7 @@ class GeneratorAPI {
105
106
} else if ( Array . isArray ( value ) && Array . isArray ( existing ) ) {
106
107
pkg [ key ] = existing . concat ( value )
107
108
} else if ( isObject ( value ) && isObject ( existing ) ) {
108
- pkg [ key ] = Object . assign ( { } , existing , value )
109
+ pkg [ key ] = merge ( existing , value )
109
110
} else {
110
111
pkg [ key ] = value
111
112
}
You can’t perform that action at this time.
0 commit comments