best way to create and also test custom widget is with mendix/generator-widget, also you can find more information in Mendix docs Build a Pluggable Web Widget: Part 1 | Mendix Documentation. Why is the best way for test it? Because each time you run npm it’s will automaticlly create mpk and import it in app.
Hi, you can supply a testproject path in your package.json where the widget is built to:
then the widget .mpk should be placed in the widgets folder of that testproject, then you can synchronize app directory app and update the widget in the Mendix testproject and rerun the project
Build the widget by running
npm run build in the root folder of the pluggable widget.
Open the Mendix test project in tests/testProject by selecting File > Open Project.
In the Open App dialog box, select Locally on disk.
Open the GroupBoxTestProject.mpr file inside your group box widget project folder.