Yes, Babel is only intended to translate new language features compatible with modern javascript engines. Babel does not compile import require.js syntax. Rather, it uses the CommonJS module syntax used by Node.js. This way you can run the code directly without additional build dependencies in Node.js.
Since it works with single files at the same time and is a direct translation, it makes no decisions about how you want to include the source code of these other files in the current one.
However, if you intend to use it in a browser, you will need a build system or assembler that supports CommonJS module instructions:
- See https://babeljs.io/docs/setup/#installation for a list of many typical build configurations.
- Browserify and Webpack are two of the most popular in the Javacript ecosystem.
- These systems combine your javascript code by inserting files wherever "required" is required, and usually produce a single js output file that you can run in ecma5
source share