You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var jsoneditor = app.component('nicegui-jsoneditor', {template:'#tpl-jsoneditor',JSONEditor} from "@json-editor/json-editor";
export default {
async mounted() {
var editor = new JSONEditor(this.$el);
}
});
A plain static import is simply removed leading to JSONEditor is not defined
The problem seems to be that import "@..."; requires Vue3 which, unfurtunately, isn't supported for custom Vue components. NiceGUI uses vbuild, which is not very actively maintained and doesn't plan to support Vue3, as discussed in manatlan/vbuild#8.
Here is a related feature request: #1992. Let's continue the discussion over there.
Description
Following the examples and built-in components like plotly I've created a custom component based on an external lib (https://github.com/json-editor/json-editor):
A dynamic import inside
jsoneditor.vue
works correctlygenerating the following
index.js
A static import
generates invalid javascript with a syntax error:
A plain static import is simply removed leading to
JSONEditor is not defined
Can I assume that static imports are currently not supported?
The text was updated successfully, but these errors were encountered: