We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
import
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
It looks like import is not allowed inside functions, like so:
function my_function() { import MyClass = require("./MyClass"); }
One can do var instead:
var
function my_function() { var MyClass = require("./MyClass"); }
It is useful for large apps to lazy-load modules as it runs, for faster start-up times. I was wondering why import is not allowed inside functions?
The text was updated successfully, but these errors were encountered:
looks like the same as #2508
Sorry, something went wrong.
No branches or pull requests
It looks like
import
is not allowed inside functions, like so:One can do
var
instead:It is useful for large apps to lazy-load modules as it runs, for faster start-up times. I was wondering why
import
is not allowed inside functions?The text was updated successfully, but these errors were encountered: