更新配置,能够简单运行实例.

This commit is contained in:
ChenX
2018-10-12 17:02:10 +08:00
parent 2ef48e17c6
commit bda2b05204
66 changed files with 732 additions and 4481 deletions

View File

@@ -1,13 +1,7 @@
import * as webpack from 'webpack';
import * as merge from 'webpack-merge';
import common from './webpack.umd';
import common from './webpack.common';
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,
@@ -19,17 +13,19 @@ const config: webpack.Configuration = merge(
devServer: {
contentBase: "./dist/",
port: 7776,
hot: true
hot: true,
},
plugins: [
// new webpack.NamedModulesPlugin(),//Hot
// new webpack.HotModuleReplacementPlugin(),//Hot
new webpack.NamedModulesPlugin(),//Hot
new webpack.HotModuleReplacementPlugin(),//Hot
new HtmlWebPackPlugin({
title: "webCAD",
// template: getpath('../src/index.html')
// template: './src/index.html'
}),
]
}
);
config.externals = {};
export default config;