Skip to content

Commit

Permalink
Merge pull request #303 from babel/dce-start-fresh-0
Browse files Browse the repository at this point in the history
Fix dce - recompute path & scope before pass
  • Loading branch information
kangax committed Nov 26, 2016
2 parents 92d1e36 + 13b6530 commit 1249def
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -699,6 +699,9 @@ module.exports = ({ types: t, traverse }) => {
keepFnArgs = false,
} = {}
} = {}) {
traverse.clearCache();
path.scope.crawl();

// We need to run this plugin in isolation.
path.traverse(main, {
functionToBindings: new Map(),
Expand Down

0 comments on commit 1249def

Please sign in to comment.