CADViewComponent/config/webpack.view.ts

32 lines
852 B
TypeScript
Raw Permalink Normal View History

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: {
// contentBase: "./dist/",
static: false,
2018-08-17 21:26:32 +08:00
port: 7776,
host: "0.0.0.0",
2018-10-12 17:02:10 +08:00
hot: true,
2018-08-17 21:26:32 +08:00
},
plugins: [
// 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;