Hi all, I am trying to create some custom nodes for an intergration the dashboard into an existing solution. The issue is, is that when creating custom third party widgets, as per the documentation (Building Third Party Widgets | Node-RED Dashboard 2.0), there is no documentation on how to include multiple widgets within a single package. As our goal is to create a lot of widgets that will intergrate with the sytem it would be unreasonable to install all of those widgets as single packages.
What I have done:
- 2 Test items created (Vue file and HTML and JS file as per example repo)
- I have tried to export mulitple libaries in the "vite.config.mjs" file under the lib section, this will throw an error due to the umd files.
Everything is standard code from the example repo, and will compile and run individually.
I have also tried to add multiple widgets in the package.json file
"node-red-dashboard-2": {
"version": "1.0.0",
"widgets": {
"exampleOne": {
"output": "ProjectName.umd.js",
"component": "exampleOne"
},
"exampleTwo": {
"output": "ProjectName.umd.js",
"component": "exampleTwo"
}
}
}
This won't work as the vite.config.js file will only export one file as previously mentioned
So then I tried this:
"node-red-dashboard-2": {
"version": "1.0.0",
"widgets": {
"exampleOne": {
"output": "exampleOne.umd.js",
"component": "exampleOne"
},
"exampleTwo": {
"output": "exampleOne.umd.js",
"component": "exampleTwo"
}
}
}
This would allow me to render exampleOne but an error will be caused when trying to render exampleTwo.
Any help would be much appreciated.