|
@@ -6,7 +6,9 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
const { VueLoaderPlugin } = require('vue-loader');
|
|
|
|
|
|
module.exports={
|
|
|
- entry:"./index.js",
|
|
|
+ entry:{
|
|
|
+ index:"./index.js",
|
|
|
+ },
|
|
|
output:{
|
|
|
filename:"bundle.js",
|
|
|
path:path.resolve(__dirname,"./dist")
|
|
@@ -39,9 +41,11 @@ module.exports={
|
|
|
new VueLoaderPlugin(),
|
|
|
new CleanWebpackPlugin(),
|
|
|
new HtmlWebpackPlugin({
|
|
|
- inject:'body',
|
|
|
- title:"webpack sample ",
|
|
|
- template:"./index.html"
|
|
|
- })
|
|
|
+ inject:'head',
|
|
|
+ title:"index page ",
|
|
|
+ template:"./index.html",
|
|
|
+ filename:"index.html",
|
|
|
+ chunks:['index'],
|
|
|
+ }),
|
|
|
]
|
|
|
}
|