We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// 多页面配置 配置了templateParameters,报错Cannot read property 'title' of undefined,有遇到过同样问题的吗
let publicPath = process.env.PUBLIC_PATH; glob.sync('./src/**/main.js').forEach(entry => { let publicPath = process.env.PUBLIC_PATH; let chunk = entry.match(/\.\/src\/(.*)\/main\.js/)[1]; const curr = pagesInfo[chunk]; if (curr) { pages[chunk] = { entry, ...curr, templateParameters: (compilation, assets, assetTags, options) => {// 配置了对象,报错html-webpack-plugin is not defined return { compilation, webpackConfig: compilation.options, htmlWebpackPlugin: { tags: assetTags, files: assets, options }, publicPath }; } }; } });
home: { entry: 'src/home/main.js', template: 'entry/index.html', filename: 'home/index.html', title: '平台' },
The text was updated successfully, but these errors were encountered:
No branches or pull requests
// 多页面配置
配置了templateParameters,报错Cannot read property 'title' of undefined,有遇到过同样问题的吗
The text was updated successfully, but these errors were encountered: