Skip to content

Commit

Permalink
supporting subPackages
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyfeway authored and Lyfeway committed Jul 5, 2018
1 parent c14cd88 commit 4eb1b16
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@ export default class WXAppPlugin {

async getEntryResource() {
const appJSONFile = resolve(this.base, 'app.json');
const { pages = [], tabBar = {} } = await readJson(appJSONFile);
const { pages = [], tabBar = {}, subPackages = [] } = await readJson(appJSONFile);

for(const pkg of subPackages) {
for(const pkgPage of pkg.pages) {
pages.push(`${pkg.root}/${pkgPage}`);
}
}

const components = new Set();
for (const page of pages) {
Expand Down

0 comments on commit 4eb1b16

Please sign in to comment.