36 lines
933 B
TypeScript
36 lines
933 B
TypeScript
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;
|