1234567891011121314151617181920212223242526272829303132333435363738 |
- const { defineConfig } = require("@vue/cli-service");
- const { resolve } = require("path");
- const port = 9010;
- const name = "退役军人职业教育基地";
- module.exports = defineConfig({
- transpileDependencies: true,
- lintOnSave: false,
- outputDir: process.env.ENV + "-dist",
- devServer: {
- host: "0.0.0.0",
- port,
- proxy: {
- // 开发模式请求基础api反代理
- [process.env.VUE_APP_BASE_API]: {
- target: `https://wx.hw.hongweisoft.com/veterans`,
- changeOrigin: true,
- pathRewrite: {
- ["^" + process.env.VUE_APP_BASE_API]: "",
- },
- }
- },
- },
- configureWebpack: {
- name,
- resolve: {
- alias: {
- "@": resolve("src"),
- },
- },
- },
- chainWebpack(config) {
- config.plugin("html").tap((args) => {
- // 标题
- args[0].title = name;
- return args;
- });
- },
- });
|