Skip to content

Instantly share code, notes, and snippets.

@zpao
Created September 11, 2017 16:29
Show Gist options
  • Save zpao/618d5a75b8af75f180f62ec998536260 to your computer and use it in GitHub Desktop.
Save zpao/618d5a75b8af75f180f62ec998536260 to your computer and use it in GitHub Desktop.
{
"plugins": [
["babel-preset-fbjs/plugins/rewrite-modules", {
map: {
'./original/foo': './rewritten/foo'
},
prefix: '',
}]
],
}
console.log('rewritten')
require('./original/foo');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment