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

feat: 支持微信小程序require.async()语法 #4197

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

yusongjohn
Copy link

pages/subPkgA/index.vue引用pages/subPkgB/util.js (两个分包)

require.async('../subpkgB/util.js'  /* webpackChunkName: "pages/subPkgB/util" */).then(function(module){
        console.log(module)
})

上面用法区别于官方用法是需要使用注释声明webpackChunkName,等价于import(..)用法。

@yusongjohn yusongjohn force-pushed the feature/base-dev/support-requireAsync-in-wxmp branch from 9cacd59 to ec8a0ef Compare March 13, 2023 11:57
@GRCmade GRCmade deleted the branch dcloudio:dev August 22, 2024 13:09
@GRCmade GRCmade closed this Aug 22, 2024
@GRCmade GRCmade reopened this Aug 28, 2024
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.

None yet

2 participants