51 lines
893 B
JavaScript
51 lines
893 B
JavaScript
'use strict'
|
|
|
|
const path = require('path')
|
|
|
|
function resolve(dir) {
|
|
return path.join(__dirname, dir)
|
|
}
|
|
|
|
const baseUrl = 'http://localhost:28080'
|
|
const port = process.env.port || process.env.npm_config_port || 8080
|
|
|
|
module.exports = {
|
|
publicPath: '/',
|
|
outputDir: 'dist',
|
|
assetsDir: 'static',
|
|
productionSourceMap: false,
|
|
devServer: {
|
|
host: '0.0.0.0',
|
|
port,
|
|
open: true,
|
|
proxy: {
|
|
[process.env.VUE_APP_BASE_API]: {
|
|
target: baseUrl,
|
|
changeOrigin: true,
|
|
cookieDomainRewrite: {
|
|
'*': ''
|
|
},
|
|
pathRewrite: {
|
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
|
}
|
|
}
|
|
}
|
|
},
|
|
css: {
|
|
loaderOptions: {
|
|
sass: {
|
|
sassOptions: {
|
|
outputStyle: 'expanded'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
configureWebpack: {
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve('src')
|
|
}
|
|
}
|
|
}
|
|
}
|