CADViewComponent/config/webpack.view.ts

36 lines
933 B
TypeScript
Raw Normal View History

2018-08-17 21:26:32 +08:00
import * as webpack from 'webpack';
import * as merge from 'webpack-merge';
import common from './webpack.umd';
import * as HtmlWebPackPlugin from "html-webpack-plugin";
import * as path from 'path';
function getpath(fileName)
{
return path.resolve(__dirname, fileName);
}
const config: webpack.Configuration = merge(
common,
{
mode: "development",
entry: "./src/ViewSrc/index.ts",
output: { pathinfo: false },
devtool: "cheap-module-eval-source-map",
devServer: {
contentBase: "./dist/",
port: 7776,
hot: true
},
plugins: [
// new webpack.NamedModulesPlugin(),//Hot
// new webpack.HotModuleReplacementPlugin(),//Hot
new HtmlWebPackPlugin({
title: "webCAD",
// template: getpath('../src/index.html')
}),
]
}
);
export default config;