CADViewComponent/config/webpack.view.ts

30 lines
800 B
TypeScript
Raw Permalink Normal View History

2018-08-17 21:26:32 +08:00
import * as webpack from 'webpack';
import * as 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
import * as HtmlWebPackPlugin from "html-webpack-plugin";
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;