interlockjs / interlock

JS bundler - inspired by Git, built on Babel.
MIT License
72 stars 7 forks source link

Per-file babel config #66

Closed divmain closed 8 years ago

divmain commented 8 years ago

If babelConfig value is not supplied via config file or command-line flag, the babel config should be loaded on a per-file basis. This means that, whenever a file is about to be transformed (and possibly before parsing), we should:

divmain commented 8 years ago

Note: it should be possible to accomplish this by passing a filename option to babelCore.transformFromAst. It should traverse the directory hierarchy to find the correct .babelrc or package.json and merge it into the provided config.