Skip to content

Commit 7eea60c

Browse files
committed
fix(alita): 修复入口文件变化 小程序不刷新的bug
1 parent 3143ad9 commit 7eea60c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/entrytran/handleEntry.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default function (ast, filepath, webpackContext) {
164164

165165
appJSON.pages.push(projectRelativePath)
166166

167-
pnode.attributes = [t.jsxAttribute(t.jsxIdentifier('diuu'), t.stringLiteral(`DIUU${go.next}`))]
167+
pnode.attributes.push(t.jsxAttribute(t.jsxIdentifier('diuu'), t.stringLiteral(`DIUU${go.next}`)))
168168
return
169169
}
170170

@@ -220,7 +220,7 @@ export default function (ast, filepath, webpackContext) {
220220
appJSON.tabBar.list = appJSON.tabBar.list || []
221221
appJSON.tabBar.list.push(tabBarElement)
222222

223-
pnode.attributes = [t.jsxAttribute(t.jsxIdentifier('diuu'), t.stringLiteral(`DIUU${go.next}`))]
223+
pnode.attributes.push(t.jsxAttribute(t.jsxIdentifier('diuu'), t.stringLiteral(`DIUU${go.next}`)))
224224

225225
return
226226
}
@@ -254,8 +254,6 @@ export default function (ast, filepath, webpackContext) {
254254
appJSON.window[k] = v
255255
}
256256
}
257-
258-
path.remove()
259257
return
260258
}
261259
}

0 commit comments

Comments
 (0)