feat(cli): add site.htmlPluginOptions config

This commit is contained in:
chenjiahan
2020-12-03 16:42:23 +08:00
parent ac856c2673
commit 7095773854
2 changed files with 10 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ export function getSiteDevBaseConfig(): WebpackConfig {
const siteConfig = getSiteConfig();
const title = getTitle(siteConfig);
const { htmlPluginOptions } = vantConfig.site;
return merge(baseConfig as any, {
entry: {
@@ -88,6 +89,7 @@ export function getSiteDevBaseConfig(): WebpackConfig {
template: join(__dirname, '../../site/desktop/index.html'),
filename: 'index.html',
baiduAnalytics,
...htmlPluginOptions,
}),
new HtmlWebpackPlugin({
title,
@@ -97,6 +99,7 @@ export function getSiteDevBaseConfig(): WebpackConfig {
template: join(__dirname, '../../site/mobile/index.html'),
filename: 'mobile.html',
baiduAnalytics,
...htmlPluginOptions,
}),
],
});