-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
28 lines (26 loc) · 860 Bytes
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const { defineConfig } = require('@vue/cli-service')
const minimist = require('minimist')
const activityPageName=minimist(process.argv.slice(2))['name']
module.exports = defineConfig({
publicPath: process.env.NODE_ENV === 'production' ? './' : `/${activityPageName}`,
pages:{
[activityPageName]:{
entry:`src/pages/${activityPageName}/js/index.js`,
template:`src/pages/${activityPageName}/index.html`,
filename:'index.html',
}
},
productionSourceMap: false,
outputDir: `activity-dist/${activityPageName}`,
chainWebpack:config => {
config.resolve.alias.set('@img',`@/pages/${activityPageName}/img`)
config.resolve.alias.set('@common',`@/common`)
},
devServer: {
historyApiFallback: {
rewrites: [
{ from: `/${activityPageName}`, to: `/${activityPageName}/index.html`},
],
},
},
})