Skip to content

Commit

Permalink
Hoist variables in unminified build output for Metro
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Apr 22, 2020
1 parent e6997f4 commit c5bbde6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/rollup/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ const terserPretty = terser({
keep_fnames: true,
ie8: false,
compress: {
// We need to hoist vars for process.env.NODE_ENV if-clauses for Metro:
hoist_vars: true,
hoist_funs: true,
pure_getters: true,
toplevel: true,
booleans_as_integers: false,
Expand Down

0 comments on commit c5bbde6

Please sign in to comment.