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