first
This commit is contained in:
69
vue.config.js
Normal file
69
vue.config.js
Normal file
@ -0,0 +1,69 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
const path = require("path");
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir);
|
||||
}
|
||||
const name = '调度APP' // page title
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true,
|
||||
// 基本路径
|
||||
// publicPath: "./",
|
||||
// publicPath: process.env.NODE_ENV === 'production' ? '/h5/rescue': '/dev/h5/rescue',
|
||||
// publicPath: process.env.NODE_ENV === 'production' ,
|
||||
// lintOnSave: process.env.NODE_ENV === 'development',
|
||||
devServer: {
|
||||
https: true,
|
||||
port: 8080,
|
||||
// open: true,
|
||||
// disableHostCheck: true,
|
||||
// allowedHosts: [
|
||||
// 'supplierwxtest.sino-assist.com',
|
||||
// 'www.sinoassist.com'
|
||||
// ],
|
||||
proxy: {
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: 'https://api1.sino-assist.com',
|
||||
ws: false,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: '' // 路径重写
|
||||
}
|
||||
}
|
||||
},
|
||||
// historyApiFallback: {
|
||||
// index: '/index.html'
|
||||
// //与output的publicPath有关(HTMLplugin生成的html默认为index.html)
|
||||
// },
|
||||
},
|
||||
configureWebpack: {
|
||||
// // provide the app's title in webpack's name field, so that
|
||||
// // it can be accessed in index.html to inject the correct title.
|
||||
name: name,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
}
|
||||
}
|
||||
},
|
||||
// 生产环境是否生成 sourceMap 文件
|
||||
productionSourceMap: false,
|
||||
// css: {
|
||||
// loaderOptions: {
|
||||
// postcss: {
|
||||
// plugins: [
|
||||
// require('postcss-pxtorem')({
|
||||
// rootValue: 16,
|
||||
// unitPrecision: 5,
|
||||
// propList: ['font', 'font-size', 'line-height', 'letter-spacing'],
|
||||
// selectorBlackList: [],
|
||||
// replace: true,
|
||||
// mediaQuery: false,
|
||||
// minPixelValue: 0,
|
||||
// exclude: /node_modules/i
|
||||
// })
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
})
|
Reference in New Issue
Block a user