fix: 修复mountElementId找不到问题

This commit is contained in:
harrywan 2024-10-29 13:13:06 +08:00
parent 41ab43d8a1
commit 2482053023

View File

@ -17,8 +17,7 @@ export default async function createHtmlWebpackConfig({
title: 'fes.js',
filename: '[name].html',
...config.html,
templateParameters: resolveDefine(config, true),
mountElementId: config.mountElementId
templateParameters: Object.assign(resolveDefine(config, true), { mountElementId: config.mountElementId }),
};
if (isProd) {
@ -61,8 +60,7 @@ export default async function createHtmlWebpackConfig({
...config.html,
title: route?.meta?.title || config.html.title || 'fes.js',
filename: _fileName,
templateParameters: resolveDefine(config, true),
mountElementId: config.mountElementId
templateParameters: Object.assign(resolveDefine(config, true), { mountElementId: config.mountElementId })
};
webpackConfig
.plugin(_fileName)