Bug description

If you try to run the example from: https://github.com/apache-superset/dynamic-import-demo-plugin Its obvious that the whole repo is outdated, but once everything is upgraded, built and the main.js is added to the superset dyn plugins, you'll get ambiguous error: index.tsx:195</button> Failed to load plugin superset-chart-hello-world with the following error: TypeError: (0 , _superset_ui_core__WEBPACK_IMPORTED_MODULE_1__.t) is not a function I know this is a functionality locked behind a feature flag and there's pretty much no documentation on dynamic plugins. But thats exactly the problem. If people cant test the feature, it not gonna develop and mature.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

Hi @kuranium! I'm Dosu and I’m helping the superset team.

The error you're seeing—TypeError: (0 , _superset_ui_core__WEBPACK_IMPORTED_MODULE_1__.t) is not a function—happens because the dynamic plugin example imports the translation utility t incorrectly. In the current Superset codebase, t is a named export, not a default export. So, instead of import t from '@superset-ui/core', you need to use import { t } from '@superset-ui/core' in your plugin code. This change should resolve the error when loading your dynamic plugin with the latest Superset version (source).

The dynamic plugin system and its documentation are indeed in flux. The Superset team is actively restructuring UI components and the plugin architecture, which may cause further changes and breakages in plugin development (source). Maintainers have noted that the current plugin system is not actively maintained and recommend caution when building new plugins until the new framework is released (source).

If you need more resources, the Community Resource Library has links to guides and videos on building custom plugins, though dynamic plugin specifics are still sparse.

If you run into permission issues (like 403 errors on public dashboards), make sure the can List on DynamicPlugin permission is added to the public role (source).

Let me know if you need help updating your plugin code or troubleshooting further!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

Comment From: rusackas

Yep, this is effectively deprecated, since it was pre-Webpack v5. The next iteration of this will be in follow-up of the Extensions SIP.

Comment From: rusackas

Closing as not-planned, since we're not going in that direction.