Creating and Bundling Extensions¶
For Mobile Development Kit Client 4.0 version onward, there’s support for creation and bundling of extensions in metadata project.
Extensions in a metadata project are bundled into the generated
bundle.js. So, for any changes in extensions, only the new generated
bundle.js must be synced to the mobile device via mobile service without reinstalling the client on mobile device. However, there should be no native code in the extensions.
Overview about creation, bundling, running, and debugging extensions in metadata project:
Extensionsfolder is created in the new s application.
- Select the Extensions folder and invoke the context menu item
MDK: New Extension, the wizard guides you through the creation process.
This process behaves the same as before and is transparent to users. For more information on bundling, see Bundling Apps
For successfully generating
bundle.js, consider the following:
- In your metadata project, change short imports to full imports for nativescript modules. The impacted files include all
- Add module name to the user setting
MDK: Bundler Externals.
Running and Debugging¶
Both running and debugging processes behave the same as earlier and is transparent to users.
Launch the Visual Studio Code editor to run the project. For detailed description on debugging, see Debugging Mobile Development Kit App with Visual Studio Code Debugger