External imports in Babel 7 do not get transpiled

I've managed to fix this by following this comment.

The solution is:

  1. Move .babelrc in the main project to babel.config.js and make it a CommonJS module
  2. Add --ignore=node_modules when running babel-node from the main project

This still seems pretty hacky and Babel doesn't seem to acknowledge the ignore property within babel.config.js it must be specified as a flag.

Babel 7 appears to only allow imports within the directory the babel config is in, however explicitly setting the --ignore flag overrides this.

You can view my working demo and the diff of what I changed to get it working.

The issue is still open on GitHub so there may be a better solution in the future.