New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Require modules first, not inside functions" #1182
Comments
When implementing async imports in large project, you also run into lots of issues. I've done a lot of web servers where auto-imports resolve with dynamic imports out of necessity, and while it may "start" right away, you have no guarantees about what has loaded and is functional. |
This causes the module to be loaded optimistically when the scripts are loaded, which increases the boot time of the app. In cases where boot time is important, this is not desirable behaviour. Regarding the point about this catching errors early, having a comprehensive test suite will help catch errors due to missing deps in functions.
The text was updated successfully, but these errors were encountered: