解析调用模块关系
npm install call-dependency
//DEMO:
deps('./src/main.js', {
fileExtensions: ['js', 'scss', 'vue', 'css'],
resolve: {
alias: {
'@': path.resolve(__dirname, '../src'),
},
extensions:['.js','.vue','.json']
},
// includeNpm: true
})
.then(res => {
return res.image('./power-puff.svg');
})
.then((writtenImagePath) => {
console.log('Image written to ' + writtenImagePath);
});
options
参数 | 必输 | 默认 | 说明 | 备注 |
---|---|---|---|---|
entry | 是 | 入口文件 |