| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- // const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
- const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
- const WebpackBar = require("webpackbar");
- const smp = new SpeedMeasurePlugin();
- module.exports = {
- productionSourceMap: false,
- publicPath: process.env.BASE_URL,
- chainWebpack: config => {
- config
- .plugin("html")
- .tap(args => {
- // NOTE 确定系统正式名称
- args[0].title = "SEEC门户系统";
- return args;
- });
- },
- css: {
- loaderOptions: {
- sass: {
- implementation: require("sass"),
- },
- },
- },
- configureWebpack: smp.wrap({
- devServer: {
- proxy: {
- "/api": {
- // target: "https://p.seec.seecoder.cn/api",
- target: "http://localhost:8080/api",
- // secure: false,
- // changeOrigin: true,
- pathRewrite: {
- "^/api": ""
- }
- }
- },
- port: 8000,
- },
- plugins: process.env.NODE_ENV === "development" ?
- [
- new WebpackBar(),
- // new BundleAnalyzerPlugin(),
- ] : []
- }),
- };
|