| 12345678910111213141516171819202122232425262728293031 |
- const { defineConfig } = require("@vue/cli-service");
- const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
- module.exports = defineConfig({
- publicPath: "/",
- transpileDependencies: true,
- configureWebpack: {
- plugins: [new NodePolyfillPlugin()],
- optimization: {
- splitChunks: {
- chunks: "all",
- },
- },
- devtool: 'source-map'
- },
- devServer: {
- open: false,
- host: '0.0.0.0',
- port: 8888,
- proxy: {
- [process.env.VUE_APP_BASE_NAME]: {
- ws: false,
- target: process.env.VUE_APP_BASE_URL,//代理地址
- changeOrigin: true, // 是否跨域
- pathRewrite: {
- ['^'+process.env.VUE_APP_BASE_NAME]: ''
- }
- },
- }
- }
- });
|