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 some error #1252

Merged
merged 12 commits into from
Aug 18, 2023
Merged

Fix some error #1252

merged 12 commits into from
Aug 18, 2023

Conversation

Blackgan3
Copy link
Collaborator

  • 补充errorHandler文档
  • 修复局部构建模式下?resolve语法报错
  • 修复局部构建模式下分包输出缺失导致构建产物无法预览问题

}, (obj, resolverContext, callback) => {
if (isResolvingPage(obj) && !matchCondition(obj.path, this.options.partialCompile)) {
if (mpx) mpx.partialCompileFilteredPagesMap[obj.path] = true
const { resourcePath } = parseRequest(obj.path)
Copy link
Collaborator

Choose a reason for hiding this comment

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

没必要parseRequest

json.subPackages = []
}
json.subPackages.push(subPackageCfg)
if (!json.subPackages) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

恢复原逻辑

@@ -1,6 +1,6 @@
{
"name": "@mpxjs/webpack-plugin",
"version": "2.8.39",
"version": "2.8.40-beta.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

不要修改version

return pagesMap[resourcePath] || currentComponentsMap[resourcePath] || mainComponentsMap[resourcePath] || currentStaticResourcesMap[resourcePath] || mainStaticResourcesMap[resourcePath] || ''
const resolveResult = pagesMap[resourcePath] || currentComponentsMap[resourcePath] || mainComponentsMap[resourcePath] || currentStaticResourcesMap[resourcePath] || mainStaticResourcesMap[resourcePath] || ''
if (!resolveResult) {
if (matchCondition(resourcePath, partialCompile)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

partialCompile不一定存在

}, () => {
if (tarRoot && subPackagesCfg) {
if (!subPackagesCfg[tarRoot].pages.length) {
subPackagesCfg[tarRoot].pages.push(pagesCache[0])
Copy link
Collaborator

Choose a reason for hiding this comment

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

pagesCache[0]不一定有值

}
} else {
if (!localPages.length) {
pagesCache[0] && localPages.push(pagesCache[0])
Copy link
Collaborator

Choose a reason for hiding this comment

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

写在上面的if里呗

@hiyuki hiyuki merged commit 5ac1d53 into master Aug 18, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants