Import your own JavaScript Library
The custom JavaScript library needs to be imported using the UMD approach.
That means the following approach will fail:
UMD uses a single wrapper function to check for the presence of module.exports
(indicating a CommonJS environment) and define.amd
(indicating an AMD environment). If neither is found, it assumes it is running in a browser and attaches the module to the global window
object.
Here is a simplified example of a UMD module:
In the example case, the new code structure would be:
Find the discussion to it in our Github: https://github.com/lowcoder-org/lowcoder/discussions/524
Last updated