分支管理
2019-03-11 本文已影响2人
三省吾身_9862
webpack.custom.config.js
// 分支名称
let project = 'xxx';
module.exports = {
html: resolve(`src/components/plm/${project}/entry/index.html`),
entry: {
'appClient': resolve(`src/components/plm/${project}/entry/index.js`)
},
alias: {
'store': resolve(`src/components/plm/${project}/store/index.js`),
'router': resolve(`src/components/plm/${project}/router/index.js`),
'lessIndex': resolve(`src/components/plm/${project}/style/index.less`),
}
}
webpack.config.js
const cm = require('./webpack.custom.config.js');
module.exports = {
entry: cm.entry,
resolve:{
alias: Object.assign({
'@': resolve('src')
}, cm.alias)
},
plugins: [
new HtmlWebPackPlugin({
filename: 'index.html',
template: cm.html // cm是对象,html是属性
})
]
}
文件夹部署
build
config
src
| assets
| components
| base
| plm
| 分支名称【project 】
| entry
| App.vue
| index.html
| index.js
| index.less
| router
| store
| repository
| 页面名称
| js
| less
| vue
| store
index.js、interface.js