Can I lazy load dependencies in SuiteScript 2.1?
# ask-stanley-ai
e
Can I lazy load dependencies in SuiteScript 2.1?
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** Based on the conversations, it appears that SuiteScript 2.1 does not support lazy loading of dependencies. In SuiteScript 2.1, you can use modern JavaScript syntax and features, but the loading of modules is still handled by the Require.js loader. In the context of client scripts, it was mentioned that SuiteScript 2.1 is not supported in older versions of NetSuite, and even in the 2021.1 version, there was a bug related to importing dependencies. Therefore, while you can use SuiteScript 2.1 for server-side scripts and enjoy the benefits of modern JavaScript, the loading of dependencies is still handled in the traditional way and does not support lazy loading.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818556607
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81408751
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813057661
Please provide your feedback on this answer.