Created
November 29, 2019 03:01
-
-
Save yanwei07/799971f21781ed4fad338cfbaef81d6a to your computer and use it in GitHub Desktop.
webpack.config.conf file for multiplepage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
entry: { | |
app: './src/app.js', | |
mgmt: ['./src/modules/mgmt/mgmt.js'], | |
login: './src/modules/login/login.js' | |
}, | |
plugins: [ | |
new MiniCssExtractPlugin({ | |
filename: "[name].css", | |
chunkFilename: "[id].css" | |
}), | |
new CleanWebpackPlugin(['dist']), | |
new VueLoaderPlugin(), | |
new HtmlWebpackPlugin({ | |
title: 'app', | |
template: './src/app.html', | |
// inject: false, | |
chunks: ['app'], | |
filename: './index.html' | |
}), | |
new HtmlWebpackPlugin({ | |
title: 'mgmt', | |
template: './src/modules/mgmt/mgmt.html', | |
// inject: false, | |
chunks: ['mgmt'], | |
filename: './mgmt/index.html' | |
}), | |
new HtmlWebpackPlugin({ | |
title: 'login', | |
template: './src/modules/login/login.html', | |
// inject: false, | |
chunks: ['login'], | |
filename: './login/index.html' | |
}) | |
] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment