File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ module.exports = (api) => {
17
17
// add import
18
18
api . injectImports ( api . entryFile ,
19
19
`import Extensionpoints from 'vue-extensionpoints'` )
20
+ api . injectImports ( api . entryFile ,
21
+ `import plugins from '@/plugins'` )
20
22
}
21
23
22
24
module . exports . hooks = ( api ) => {
@@ -27,9 +29,9 @@ module.exports.hooks = (api) => {
27
29
const lines = contentMain . split ( / \r ? \n / g)
28
30
29
31
// if not already found, add Vue.use to file
30
- if ( lines . findIndex ( line => line . match ( / V u e .u s e \( E x t e n s i o n p o i n t s \) / ) ) < 0 ) {
32
+ if ( lines . findIndex ( line => line . match ( / V u e .u s e \( E x t e n s i o n p o i n t s / ) ) < 0 ) {
31
33
const renderIndex = lines . findIndex ( line => line . match ( / n e w V u e / ) )
32
- lines [ renderIndex ] = `Vue.use(Extensionpoints)${ EOL } ${ EOL } ` + lines [ renderIndex ]
34
+ lines [ renderIndex ] = `Vue.use(Extensionpoints, plugins )${ EOL } ${ EOL } ` + lines [ renderIndex ]
33
35
fs . writeFileSync ( api . entryFile , lines . join ( EOL ) , { encoding : 'utf-8' } )
34
36
}
35
37
} )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-cli-plugin-extensionpoints" ,
3
- "version" : " 0.1.3 " ,
3
+ "version" : " 0.1.4 " ,
4
4
"description" : " Vue CLI plugin for adding extensionpoints" ,
5
5
"main" : " index.js" ,
6
6
"author" :
" Christian González <[email protected] " ,
You can’t perform that action at this time.
0 commit comments