Error with custom plugins

Hi,
weweb support told me to ask this here.
I am experimenting with custom Elements and Sections and from the link inside the dev editor I found this GitHub - weweb-assets/plugin-dayjs.
The dev docs don’t mention Plugins but only Elements and Sections.
However you can actually add Plugins in the dashboard and I couldn’t resist the temptation :upside_down_face:.
In local development importing a plugin throws an error rendering the plugin unusable.
The error is generated here: webpack:///./src/wwLib/services/wwPluginHelper.js on line 87:
if (plugin.pluginCategory.name === 'auth') {. The exception is: Cannot read properties of undefined (reading 'name').
I think that line should be: if (plugin.pluginCategory && plugin.pluginCategory.name === 'auth') {
Also you can actually import a plugin from github and add it to an app, but this breaks the app editor, with the same error, without the possibility to remove the plugin from the app. See this editor for an example Editor - WeWeb.
Support told me to ping @aurelie .

As a side note I am now testing an integration of Stripe Elements as a custom Element in weweb and have tips to share and questions to ask. Should we add a “Developer” category to this community?

Cheers

Mariano

Hi :). I am indeed the right person to ping.

The error you mention has been corrected, and should be pushed in production on the next release.
You can indeed develop plugin for Weweb, we choose to not documentated it yet because we may change the way we are doing it in the feature. But basically this is how all our plugins are done internally (you can even take a look at our code, all our element/section/plugin are open source).

I will ask to create the Developer category, will be happy to share about Stripe, as we will start working on a plugin soon.

1 Like

Hi, thanks for that.
Sorry for the late reply.

I had a look of your code. I like it is open source because it is helpful.

I made a test app with a Stripe Elements integration to have a feel of weweb as a platform and the development workflow for custom components. I put here the link to the editor and the code of the custom element in case it might be helpful for other people to see.

I like the flexibility of the platform and I look forward to play with the plugins.