Imports a plugin. Returns the interfaces exposed by the plugin through main. Refer to Using Plugins - JS Interface
Parameters
| Name | Type | Description |
|---|---|---|
| module | string | The alias of the plugin to be imported. Starting from Base Library 2.14.0, the plugin's AppID can also be used |
Sample Code
var myPluginInterface = requirePlugin('myPlugin');
myPluginInterface.hello();
var myWorld = myPluginInterface.world;
var myPluginInterface = requirePlugin('wxIDxxxxxxxxxx'); // Starting from 2.14.0