Skip to content

Instantly share code, notes, and snippets.

@helb
Last active August 11, 2016 10:12
Show Gist options
  • Save helb/f98122f85ed04d978868 to your computer and use it in GitHub Desktop.
Save helb/f98122f85ed04d978868 to your computer and use it in GitHub Desktop.
convert require() to import
find:
(var|const) ([a-zA-Z]+) = require\((.+)\)
replace with:
import $2 from $3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment