Custom Table block preview

Hi! I updated to 3.5.7, and there is an improved preview for the Table block.

I have a custom view for Table block based on the regular view, and trying to update, but I just cannot find a way to import this module

import structure from "@/mixins/forms/structure.js";

All of my blocks and previews are in one plugin, so the structure is:

  • index.js
  • index.php
  • index.css
  • and subfolders

I didn’t use vue files for previews, it is all from index.js

How to import that structure module in this kind of setup?

I suppose there is no other way than to move all previews to vue files and compile index.js…

Importing only works if you have a build process, yes.

But I wonder if it shouldn’t be possible to extend the existing preview rather to create a new one so that this wouldn’t be necessary.

Hm, but even with the build process it is not possible to customize Table block preview

Error

Could not install from "@\mixins" as it does not contain a package.json file.

That import at the line 43 kirby/Table.vue at master · getkirby/kirby · GitHub is making customization of Table block preview impossible.