Created
August 12, 2018 04:46
-
-
Save fega/3df957c4cf1347d92dfbbd452a9e0e85 to your computer and use it in GitHub Desktop.
Replace al import "" from "" for require in javascript
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
# time saving when you want to get rid babel.js | |
regex: import (\w+) from "((\w|\-)+)"; # this will match import export | |
const $1 = require("$2"); # this will replace them with require |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment