Skip to content
New issue

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

fix: html plugin for mako #12655

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/preset-umi/src/features/mako/mako.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default (api: IApi) => {
generateEnd: ({ stats }: any) => {
const entryPointFiles = new Set<string>();

for (const chunk of stats.entrypoints['umi'].chunks) {
for (const chunk of stats.entrypoints['umi']?.chunks || []) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里 'umi' 这需要换成 api.appData.umi.importSource,社区的实现 比如 kmi 就会有问题

@xiefengnian 注意下

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

importSource 这个之也不对,还是应该从配置里面去读 entry 的值
还有多 entry 的情况

const files = stats.chunks.find((c: any) => c.id === chunk).files;
for (const file of files) {
entryPointFiles.add(file);
Expand Down
Loading