const path = require("path");
module.exports = {
  publicPath: "/pc/", //打包后部署在一个子路径上http:xxx/m/
  productionSourceMap: false,
  lintOnSave: false,
  css: {
    loaderOptions: {
      less: {
        javascriptEnabled: true,
      },
    },
  },
  configureWebpack: {
    // provide the app's title in webpack's name field, so that
    // it can be accessed in index.html to inject the correct title.
    resolve: {
      alias: {
        "@": path.join(__dirname, "src"),
      },
    },
  },
  devServer: {
    proxy: {
      "^/api": {
        target: "http://lnh.run4wd.com/api", //测试
        // target: "http://lnh.ssish.com/api/",//生产，需api
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/api": "", // rewrite path
        },
      },
    },
  },
};
