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

设置分包配置,编译后的app.json页面会重复 #229

Closed
hanger121212 opened this issue Apr 4, 2018 · 4 comments
Closed

设置分包配置,编译后的app.json页面会重复 #229

hanger121212 opened this issue Apr 4, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@hanger121212
Copy link

mpvue: 1.0.7
mpvue-template-compiler: 1.0.7
mpvue-loader: 1.0.10

根据小程序的格式,在main.js中添加subPackages配置

    subPackages: [{
      "root": "test_subpackages",
      "pages": [
        "testa", "testb"
      ]
    }],

在webpack的entry中引入分包的页面.
编译后的app.json分包页面重复

{
  "pages": [
    "pages/cafe_house/cafe_house",
    "test_subpackages/testa",
    "test_subpackages/testb"
  ],
  "subPackages": [
    {
      "root": "test_subpackages",
      "pages": [
        "testa",
        "testb"
      ]
    }
  ],
}

小程序就会报错
image

期望的表现:

应该是mpvue-loader没做这方面的处理吧,或者增加取消自动加到pages的配置

@anchengjian anchengjian added the enhancement New feature or request label Apr 4, 2018
@charmingzuo
Copy link

build/webpack.base.conf.js 里面搜索 pagesEntry 看下

@kidjayhuang
Copy link

mpvue什么时候可以支持小程序分包啊,我的项目都要超2m了

@aOrz
Copy link
Member

aOrz commented Jul 16, 2018

参考下 mpvue/mpvue-quickstart#39 的配置改动,将 app.json 使用插件直接 copy 过去。

@aOrz aOrz closed this as completed Jul 16, 2018
@aOrz
Copy link
Member

aOrz commented Jul 16, 2018

@LIL-JAY 参考 #672

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants