alibaba / alibaba/MiniOptimizer
微信小程序打包优化后,分包无法加载到组件
- Dominant language
- TypeScript
- Stars
- 59
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
使用小程序压缩优化后,发现分包的组件找不到,报错:
VM28 WAService.js:2 Component is not found in path "pages/member/_/components/basic-component/BaseButton/index" (using by "pages/member/info/index")(env: macOS,mp,1.05.2204250; lib: 2.24.6)

打包没有使用其他选项,都是默认配置,打包指令
node "/Users/apple/Downloads/MiniOptimizer-master/lib/bin.js" /Users/apple/Desktop/app/business-district-applet/dist/build/mp-weixin --type wx -o /Users/apple/Desktop/app/business-district-applet/dist/build/mp-weixin2
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/bin.js and reproduce the reported command against the supplied dist/build/mp-weixin path using the default options. Trace how optimization handles subpackages and component paths, then verify that pages/member/info/index can load BaseButton from the optimized output without the reported missing-component error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100