更新配置,能够简单运行实例.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user