At the moment I am trying to transpile a JavaScript project which is written using EC6 with Babel. I used the Babel CLI with the following command:
babel my-project --ignore node_modules --out-dir my-project-compiled --copy-files
which transpiles all the js source code from directory 'my-project' and puts the results into the new folder 'my-project-compiled'. All other non-js files are simply copied. But unfortunately it does not update relative paths. (It stills references the files in the old folder which were not transpiled and that causes an error.)
So instead of
var _system = require("./system");
I get
var _system = require("../../../src/core/system");
:( Is it possible to force Babel to update such references?
Thank you very much in advance.
Any help would be appreciated.
Daniel