Created
October 16, 2016 11:41
-
-
Save pesterhazy/024fee64e05a28e1f1b9ff602d09f784 to your computer and use it in GitHub Desktop.
patch jsbundle to set __DEV__ to false for a bundle built with `--dev true`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Patch jsbundle to set __DEV__ to false | |
import sys, re | |
print(re.sub(r'__DEV__\s*=\s*true;', "__DEV__=false;", | |
sys.stdin.read())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment