3 ms·
Why not use ES6 imports? (Rather than require... What are the benefits of "import" over "require"?
by jessaustin 11y ago
Why not use ES6 imports? (Rather than require...
What are the benefits of "import" over "require"?
- mnutt 11y agoThe main benefit I see of import is for client-side code, so that you can statically determine a file's imports ahead of time without actually having to run the code. Require is a regular function rather than a directive, and is probably needed for this framework to automatically find and load all controllers, models, etc.