const webpack = require("webpack"); module.exports = { //打包要放在根目录的mobile文件夹下面 所以加入publicPath配置 publicPath: process.env.NODE_ENV === 'production' ? '/mobile/' : '/', configureWebpack: { //֧��jquery plugins: [ new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", "windows.jQuery": "jquery" }) ] }, devServer: { //open: true, //是否自动弹出浏览器页面 host:'192.168.1.248', // host: "localhost", port: '8082', https: false, hotOnly: false, proxy: { '/api': { // target: 'http://localhost:60737', //本地后台 target: 'http://192.168.1.248:8085', ws: true, //代理websockets changeOrigin: true, // 虚拟的站点需要更管origin //pathRewrite: { //重写路径 比如'/api/aaa/ccc'重写为'/aaa/ccc' // '^/api': '' //} }, }, }, };
vue.config.js备份一个
最新推荐文章于 2022-09-29 14:00:49 发布