Skip to content

Commit

Permalink
fix(okam-build): fix config property existed in nested object leading…
Browse files Browse the repository at this point in the history
… to the config info missing #20
  • Loading branch information
wuhy committed Dec 18, 2018
1 parent 74fa7b3 commit afd943e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/okam-build/lib/processor/js/transform/visitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ function getCodeTraverseVisitors(t, initConfig, opts) {
let config = getPlainObjectNodeValue(prop.value, path, t);
initConfig.config = config;
removeNode(t, path, {tail: true});

// skip children traverse
path.skip();
}
else if (keyName === 'mixins') {
// extract the mixins information for page/component
let mixins = componentTransformer.getUsedMixinModulePaths(
prop.value, path, t, opts
);
initConfig.mixins = mixins;

path.skip();
}
else if (!isBehavior && hasComponents && keyName === 'components') {
// extract the using components information for page/component
Expand All @@ -55,6 +60,11 @@ function getCodeTraverseVisitors(t, initConfig, opts) {
);
initConfig.components = config;
removeNode(t, path, {tail: true});

path.skip();
}
else {
path.skip();
}
}
};
Expand Down

0 comments on commit afd943e

Please sign in to comment.