You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/config/webpack.dev.ts

60 lines
1.7 KiB

import * as webpack from 'webpack';
3 years ago
import { Configuration } from 'webpack';
import { merge } from 'webpack-merge';
import common from './webpack.common';
const config: webpack.Configuration = merge(
common,
{
mode: "development",
output: { pathinfo: false },
devtool: "eval-source-map",
//https://www.webpackjs.com/configuration/stats/
stats: "errors-only" || {
assets: false,
timings: false,
builtAt: false,
cachedAssets: false,
hash: false,
modules: false,
performance: false,
entrypoints: false,
// 添加 children 信息
children: false,
// 添加 chunk 信息(设置为 `false` 能允许较少的冗长输出)
chunks: false,
// 将构建模块信息添加到 chunk 信息
chunkModules: false,
// 添加 chunk 和 chunk merge 来源的信息
chunkOrigins: false,
reasons: false,
source: false
},
devServer: {
static: false,
port: 7778,
host: "0.0.0.0",
hot: true,
proxy: {
"/api": {
target: "https://cad.leye.site",
pathRewrite: { '^/api': '' },
secure: false,
headers: {
Host: 'cfcad.cn',
Origin: "https://cfcad.cn"
}
}
}
},
optimization: {
moduleIds: "named",
}
3 years ago
} as Configuration
);
export default config;