123456789101112131415161718192021222324252627282930313233 |
- const webpack = require("webpack");
- // 配置手册: https://cli.vuejs.org/zh/config/#vue-config-js
- const { defineConfig } = require("@vue/cli-service");
- const defProxy = {
- "/api": {
- target: process.env.VUE_APP_MAIN_PROXY,
- changeOrigin: true,
- },
- "/file": {
- target: process.env.VUE_APP_MAIN_PROXY_FILE,
- changeOrigin: true,
- },
- };
- module.exports = defineConfig({
- transpileDependencies: [/\bvue-awesome\b/],
- // publicPath: './',
- devServer: {
- port: 8066,
- proxy: defProxy,
- },
- configureWebpack: {
- devtool: "source-map",
- plugins: [
- // Ignore all locale files of moment.js
- new webpack.IgnorePlugin({
- resourceRegExp: /^\.\/locale$/,
- contextRegExp: /moment$/,
- }),
- ],
- },
- });
|