Skip to content

Commit

Permalink
feat: multilevel dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
hua1995116 committed Jun 30, 2020
1 parent c25fe50 commit 85b3123
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,19 @@
b();
},
"./a.js": function(module, exports, require) {
const bar = require("./foo/bar.js");

module.exports = function() {
console.log("a");
bar();
return "aaaaa";
};
},
"./foo/bar.js": function(module, exports, require) {
module.exports = () => {
console.log("bar");
};
},
"./b.js": function(module, exports, require) {
module.exports = function() {
console.log("b");
Expand Down
3 changes: 3 additions & 0 deletions example/a.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const bar = require('./foo/bar.js');

module.exports = function () {
console.log('a');
bar();
return 'aaaaa';
}
3 changes: 3 additions & 0 deletions example/foo/bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = () => {
console.log('bar');
}

0 comments on commit 85b3123

Please sign in to comment.