2023-07-13 11:57:28 +08:00
|
|
|
import HtmlWebPackPlugin from "html-webpack-plugin";
|
2018-08-17 21:26:32 +08:00
|
|
|
import * as webpack from 'webpack';
|
2022-02-16 13:48:57 +08:00
|
|
|
import merge from 'webpack-merge';
|
2018-10-12 17:02:10 +08:00
|
|
|
import common from './webpack.common';
|
2018-08-17 21:26:32 +08:00
|
|
|
|
|
|
|
const config: webpack.Configuration = merge(
|
|
|
|
common,
|
|
|
|
{
|
|
|
|
mode: "development",
|
|
|
|
entry: "./src/ViewSrc/index.ts",
|
|
|
|
output: { pathinfo: false },
|
2020-05-07 10:51:27 +08:00
|
|
|
devtool: "eval-source-map",
|
2018-08-17 21:26:32 +08:00
|
|
|
devServer: {
|
2023-07-13 11:57:28 +08:00
|
|
|
// contentBase: "./dist/",
|
|
|
|
static: false,
|
2018-08-17 21:26:32 +08:00
|
|
|
port: 7776,
|
2023-07-13 11:57:28 +08:00
|
|
|
host: "0.0.0.0",
|
2018-10-12 17:02:10 +08:00
|
|
|
hot: true,
|
2018-08-17 21:26:32 +08:00
|
|
|
},
|
|
|
|
plugins: [
|
2023-07-13 11:57:28 +08:00
|
|
|
// new webpack.NamedModulesPlugin(),//Hot
|
2018-10-12 17:02:10 +08:00
|
|
|
new webpack.HotModuleReplacementPlugin(),//Hot
|
2018-08-17 21:26:32 +08:00
|
|
|
new HtmlWebPackPlugin({
|
|
|
|
title: "webCAD",
|
2018-10-12 17:02:10 +08:00
|
|
|
// template: './src/index.html'
|
2018-08-17 21:26:32 +08:00
|
|
|
}),
|
|
|
|
]
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
export default config;
|