This page explains how to update your plugins when migrating to Flex UI 2.x.x. For more information about the entire migration process, see Migrate from Flex UI 1.x.x to 2.x.x.
Flex UI 2.x.x works with Flex Plugins CLI 4.1.3 or higher.
Install the latest version of the Flex Plugins CLI.
Your plugins must use the Flex Plugins CLI in order to be served on Flex UI 2.x.x. If you have plugins built on older versions of the Plugin Builder, you need to migrate them to use the Plugins CLI.
Based on the implementation of your plugin, you may need to update your plugin source code and its dependencies to be compatible with Flex UI 2.x.x.
When you leverage the create
command of the Flex Plugins CLI to create a new plugin, you need to update the dependencies on the package.json file of the plugin to make it compatible with 2.x.x.
Note the differences between the dependencies and devDependencies on the following sample package.json files. You need to update the devDependencies
in order to run your plugin locally via the twilio flex:plugins:start
command of the CLI.
1{2"name": "plugin-sample",3"version": "0.0.0",4"private": true,5"scripts": {6"postinstall": "flex-plugin pre-script-check"7},8"dependencies": {9"@twilio/flex-plugin-scripts": "5.1.1",10"react": "16.5.2",11"react-dom": "16.5.2",12"react-emotion": "9.2.12"13},14"devDependencies": {15"@twilio/flex-ui": "^1",16"react-test-renderer": "16.5.2"17}18
Following are some guidelines to help you manage the migration of your plugins:
twilio flex:plugins:start
command of the Flex Plugins CLI.twilio:flex:plugins:deploy
command. We recommend following the Semantic Versioning format for managing your plugin version. Since this plugin is compatible with 2.x.x, we recommend registering this plugin version as a new major version. Use the --major argument and write a clear description for the Changelog of this version.