CADViewComponent/config/webpack.view.ts

30 lines
790 B
TypeScript
Raw Normal View History

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';
2022-02-16 13:48:57 +08:00
import HtmlWebPackPlugin from "html-webpack-plugin";
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/",
port: 7776,
2018-10-12 17:02:10 +08:00
hot: true,
2018-08-17 21:26:32 +08:00
},
plugins: [
2018-10-12 17:02:10 +08:00
new webpack.NamedModulesPlugin(),//Hot
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;