Skip to content

##new feature: 小程序分包支持 #30

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

Closed
wants to merge 1 commit into from
Closed

Conversation

ytqiu
Copy link

@ytqiu ytqiu commented Jun 27, 2018

对mpvue-loader添加配置mergePages: false,使得mpvue-loader跳过对pages的默认处理,在main.js中指定分包的配置。

    pages: ['pages/index/main', 'pages/counter/main', 'pages/logs/main'],
    subPackages: [
      {
        root: 'testpkg',
        pages: ['pages/webview/index']
      }
    ],
mergePages: false设置后不能使用^代表小程序主页

@anchengjian
Copy link
Member

有测试的仓库么?

@F-loat
Copy link
Member

F-loat commented Jun 27, 2018

单独加这个感觉意义不大,目前比较大的问题还是生成的文件的路径问题,可能还有公共部分的提取,参考 Meituan-Dianping/mpvue#590 ,最好是能一并解决了
目前这个 pr 的效果使用 mpvue-entry 已经可以实现了,但是事实上绝大部分文件依然是在主包里

@ytqiu ytqiu closed this Jul 1, 2018
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.

3 participants