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

38 lines
1.1 KiB

import * as webpack from 'webpack';
import merge from 'webpack-merge';
import { outputDir } from './outputPath';
import common from './webpack.common';
import AddAssetHtmlPlugin from "add-asset-html-webpack-plugin";
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
new AddAssetHtmlPlugin([{ filepath: "./node_modules/three/build/three.js" }])
]
}
);
export default config;