Hi.
I have set of classes in separated files. For example:
imports/file1.js
export default class Class1 {}
imports/file2.js
import Class1 from '/imports/file1.js';
export default class Class1 {}
And i have cron-task in file imports/cron.js which runs in separeted Node process:
const Class2 = require('imports/file2.js');
There is error like
SyntaxError: Unexpected token import in file2.js:1
(function (exports, require, module, __filename, __dirname) { import Class1 from 'file1.js';
Problem is that I have pretty big set of modules which imports each other. I don’t like idea to rewrite entire application to “require” notation. What is best choice in such case? Transpile cron.js by Babel?