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) => {
1717 // add import
1818 api . injectImports ( api . entryFile ,
1919 `import Extensionpoints from 'vue-extensionpoints'` )
20+ api . injectImports ( api . entryFile ,
21+ `import plugins from '@/plugins'` )
2022}
2123
2224module . exports . hooks = ( api ) => {
@@ -27,9 +29,9 @@ module.exports.hooks = (api) => {
2729 const lines = contentMain . split ( / \r ? \n / g)
2830
2931 // 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 ) {
3133 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 ]
3335 fs . writeFileSync ( api . entryFile , lines . join ( EOL ) , { encoding : 'utf-8' } )
3436 }
3537 } )
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-cli-plugin-extensionpoints" ,
3- "version" : " 0.1.3 " ,
3+ "version" : " 0.1.4 " ,
44 "description" : " Vue CLI plugin for adding extensionpoints" ,
55 "main" : " index.js" ,
66 "author" :
" Christian González <[email protected] " ,
You can’t perform that action at this time.
0 commit comments