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

36 lines
951 B

import * as webpack from 'webpack';
import merge from 'webpack-merge';
import { outputDir } from './outputPath';
import common from './webpack.common';
const config: webpack.Configuration = merge(
common,
{
mode: "development",
output: { pathinfo: false },
devtool: "cheap-module-eval-source-map",
devServer: {
contentBase: outputDir,
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"
}
}
}
},
plugins: [
new webpack.NamedModulesPlugin(),//Hot
]
}
);
export default config;