square/es6-module-transpiler — pull request #129 by ericf (2014-06-17 21:52:48+00:00)
Title: Add ExternalResolver to filter modules which should not be processed

This adds a new resolver class, `ExternalResolver`, which can be used to filter-out modules which should not be parsed/validated by the transpiler becuase they're external to the system. The `-e` CLI option tells the compiler to ignore external modules, instead of trying to find/parse/validate them.

```js
// bar.js
import React from 'react';
export var bar = 'bar';

// foo.js
import {bar} from './bar';
```

When the `-e` option is passed, the compiler will see that the module `'react'` is external and therefore ignore trying to find it, parse it, and validate it.

----

**This relates to this discussion: https://github.com/square/es6-module-transpiler/pull/126#discussion_r13867506**