Under the development environment, dev-server agent is used in webpack.dev.conf.js to deal with cross-domain problems. What if this code is not packaged after the production environment is packaged?

add before (app) {.} to the devServer of webpack.dev.conf.js to deal with cross-domain problems. Get the data normally in the development environment. But the error is reported after compilation and packaging, so how does this code go into the configuration file of the production environment, and where is it placed? There is no such field as devserver in webpack.prod.conf.js. Ask God for help!

const devWebpackConfig = merge(baseWebpackConfig, {
  module: {
    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
  },
  // cheap-module-eval-source-map is faster for development
  devtool: config.dev.devtool,

  // these devServer options should be customized in /config/index.js
  devServer: {
    clientLogLevel: "warning",
    historyApiFallback: {
      rewrites: [
        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, "index.html") },
      ],
    },
    hot: true,
    contentBase: false, // since we use CopyWebpackPlugin.
    compress: true,
    host: HOST || config.dev.host,
    port: PORT || config.dev.port,
    open: config.dev.autoOpenBrowser,
    overlay: config.dev.errorOverlay
      ? { warnings: false, errors: true }
      : false,
    publicPath: config.dev.assetsPublicPath,
    before(app) {
      app.get("/api/getDisc", (req, res) => {
        let url = "https://c.y.qq.com/splcloud/fcgi-bin/fcg_get_diss_by_tag.fcg"
        axios.get(url, {
          headers: {
            referer: "https://y.qq.com"
          },
          params: req.query
        }).then((response) => {
          res.json(response.data)
        }).catch((e) => {
            console.log(e)
        })
      })
    },
    proxy: config.dev.proxyTable,
    quiet: true, // necessary for FriendlyErrorsPlugin
    watchOptions: {
      poll: config.dev.poll,
    }
  },

devserver means that it only works in the development environment, but it certainly doesn't work when packaged online. Because there is no devserver after packing

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bdcb27-31314.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bdcb27-31314.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?