You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.4 KiB
66 lines
1.4 KiB
/*
|
|
* @Author: gaowenya
|
|
* @email: gaowenya_a@163.com
|
|
* @Date: 2023-06-19 15:40:10
|
|
* @LastEditors:
|
|
* @LastEditTime:
|
|
*/
|
|
const path = require('path');
|
|
const settings = require('./src/config/setting');
|
|
|
|
const resolve = dir => path.join(__dirname, dir);
|
|
|
|
module.exports = {
|
|
|
|
css: {
|
|
loaderOptions: {
|
|
less: {
|
|
modifyVars: {
|
|
// 'primary-color': '#002582',
|
|
'primary-color': '#007AFF',
|
|
},
|
|
javascriptEnabled: true,
|
|
},
|
|
},
|
|
},
|
|
lintOnSave: true,
|
|
publicPath: process.env.NODE_ENV === 'development' ? '/' : settings.publicPath,
|
|
transpileDependencies: ['vuetify'],
|
|
devServer: {
|
|
open: true,
|
|
overlay: {
|
|
warnings: false,
|
|
errors: true,
|
|
},
|
|
proxy: {
|
|
// proxy all requests starting with /api to json placeholder
|
|
[settings.proxyUrl]: {
|
|
target: settings.apiUrl, // 代理接口
|
|
changeOrigin: true,
|
|
pathRewrite: {
|
|
[`^${settings.proxyUrl}`]: '', // 代理的路径
|
|
},
|
|
},
|
|
},
|
|
// proxy: settings.apiUrl,
|
|
disableHostCheck: true,
|
|
https: false,
|
|
},
|
|
|
|
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: settings.title,
|
|
// devtool: 'source-map',
|
|
// description: settings.description,
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve('src'),
|
|
'api': resolve('src/api'),
|
|
'components': resolve('src/components'),
|
|
'views': resolve('src/views'),
|
|
'config': resolve('src/config'),
|
|
},
|
|
},
|
|
}
|
|
};
|