Skip to content

Instantly share code, notes, and snippets.

@nnaku
Created April 4, 2019 18:50
Show Gist options
  • Save nnaku/a70c3615479336c6fbf09c8e2640567e to your computer and use it in GitHub Desktop.
Save nnaku/a70c3615479336c6fbf09c8e2640567e to your computer and use it in GitHub Desktop.
// Without this plugin...
import SomeExample from '../../../some/example.js';
const OtherExample = require('../../../other/example.js');
// With babel-plugin-root-import you can write...
import SomeExample from '~/some/example.js';
const OtherExample = require('~/other/example.js');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment