智慧农业后台管理页面
shuishen
2022-07-29 e57c42d8338904f0045a72665f2ad43b5012cc53
vue.config.js
@@ -1,9 +1,29 @@
const path = require('path')
const CopywebpackPlugin = require('copy-webpack-plugin')
const dvgisDist = './node_modules/@dvgis'
module.exports = {
    //路径前缀
    publicPath: "/",
    lintOnSave: true,
    productionSourceMap: false,
    chainWebpack: (config) => {
        config.plugin('copy').use(CopywebpackPlugin, [
            [
                {
                    from: path.join(dvgisDist, 'dc-sdk/dist/resources'),
                    to: 'libs/dc-sdk/resources'
                }
                // {
                //     from: './public/wp',
                //     to: 'wp'
                // },
                // {
                //     from: './public/qx',
                //     to: 'qx'
                // }
            ]
        ])
        //忽略的打包文件
        config.externals({
            'vue': 'Vue',
@@ -26,7 +46,7 @@
        proxy: {
            '/api': {
                //本地服务接口地址
                // target: 'http://localhost:89',
                // target: 'http://192.168.0.126:89',
                //远程演示服务地址,可用于直接启动项目
                target: 'http://182.106.212.58:8013/api',
                ws: true,