123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- /*
- * @Author: tengmingxue 1473375109@qq.com
- * @Date: 2022-10-08 14:40:20
- * @LastEditors: zjz
- * @LastEditTime: 2024-08-21 14:55:25
- * @FilePath: \mbBigScreen\vue.config.js
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- */
- const path = require('path')
- function resolve(dir) {
- return path.join(__dirname, dir)
- }
- const baseUrl = process.env.VUE_APP_API_BASE_URL
- //自定义配置信息
- // const defaultSettings = require('./src/utils/settings.js')
- // const name = defaultSettings.sysTitle || '登录系统' // page title
- /**
- * @description vue 配置相关
- */
- module.exports = {
- publicPath: './',
- outputDir: 'dist',
- assetsDir: 'static',
- // indexPath: 'index.html',
- lintOnSave: false, //'default'
- productionSourceMap: false, // 生产环境是否生成 sourceMap 文件
- devServer: {
- port: "9000", // 端口
- open: true, // 自动开启浏览器
- compress: false, // 开启压缩
- overlay: {
- warnings: false,
- errors: false
- },
- proxy: {
- '/api': {
- target: baseUrl,
- changeOrigin: true,
- pathRewrite: {
- '^/api': 'http://125.64.42.165:1111'
- }
- },
- '/service':{
- //target: 'http://221.182.8.141:10005',
- target: 'http://117.176.120.194:8085',
- changeOrigin: true,
- pathRewrite: {
- '^/service': '/service'
- }
- },
- }
- },
- css: {
- // 是否使用css分离插件 ExtractTextPlugin
- extract: true,
- // 开启 CSS source maps?
- // sourceMap: false,
- // css预设器配置项
- loaderOptions: {
- // pass options to sass-loader
- sass: {
- // 引入全局变量样式,@使我们设置的别名,执行src目录
- //data: `@import "@/styles/index.scss";`
- }
- },
- requireModuleExtension: true
- },
- configureWebpack: {
-
- },
- chainWebpack:(config) =>{
- config.resolve.alias
- .set('@views',resolve('src/views'))
- }
-
- }
|