MK
Size: a a a
MK
MK
IB
YZ
k
MK
VB
const HtmlWebpackPlugin = require('html-webpack-plugin');
const globalHtmlTemplateSettings = {
template: 'public/index.html',
favicon: 'public/icon.png',
hash: true
};
/**
* Match all standalone entries.
*/
const appEntries = [
{
applicationId: 'app1',
applicationTitle: 'App 1',
filename: 'app1/index.html'
},
{
applicationId: 'app2',
applicationTitle: 'App 2',
filename: 'app2/index.html'
}
];
/**
* Creates entry html pages.
*/
const HtmlWebpackPluginInstances = appEntries.map(
entry =>
new HtmlWebpackPlugin(Object.assign(entry, globalHtmlTemplateSettings))
);
module.exports = {
entry: {
main: './src/index.js'
},
plugins: [
/*
* Plugin: HtmlWebpackPlugin
* Description: Simplifies creation of HTML files to serve your webpack bundles.
* This is especially useful for webpack bundles that include a hash in the filename
* which changes every compilation.
*
* @see https://github.com/ampedandwired/html-webpack-plugin
*/
...HtmlWebpackPluginInstances,
]
};VS
MK
MK
ДГ
ДГ
MK
PR
MK
IB

IN
И
IB