vue-router-reader
v1.1.1
Published
vue-router-reader
Downloads
5
Readme
vue-router-reader
- A node tool for reading a vue program's router.
install
npm install vue-router-reader --save / yarn add vue-router-reader
usage
const routerReader = require('vue-router-reader')
const dir = 'somedir'
routerReader(dir, config => {
config.resolve.alias.set('router', path.join(dir, 'src', 'router'))
}).then((res) => {
console.log(res)
})
the first argument is dir of the program which to read
You should use the program's webpack config which make a influence to router,you can config this with chain webpack api in the second argument.webpack chain