Used to import modules. Just like the requireModule
method, but loading asynchronously.
During the loading, the other JavaScript code can be executed.
The module loaded by requireModuleAsync
needs to use a specific format. Use @lynx-js/runtime-wrapper-webpack-plugin
to generate modules that are requireModuleAsync
-loadable.
The path of the module. Can be a remote path, or a path inside the template.
The callback to be executed after the require is finished
null
will be passed as the first parameter, and the exported value of the module will be passed as the second parameter.None (undefined
).
requireModuleAsync
will return an error in callback when:
LCD tables only load in the browser