eclipsesource / jsonforms-vuetify-renderers

https://jsonforms-vuetify-renderers.netlify.app/
Other
27 stars 26 forks source link

Custom renderers don't render when built with Vite #97

Closed yaffol closed 10 months ago

yaffol commented 1 year ago

When building a project using Vue 3, Vuetify Renderers 3.1.0-preview and Vite, the custom renderers do not render anything.

When run under Vite dev server, they do render.

My suspicion is this is related to how the renderers are passed as reactive objects, which is somehow being dropped or otherwise affected by the rollup stage of vite build.

Example repository: https://github.com/yaffol/json-forms-vuetify-vite-seed

Reproduction:

  1. Checkout the repo
  2. run npm run dev - the custom renderer will render
  3. run npm run build && npx serve dist - the custom renderer will not render

In debugging this, I could not cause any side-effects, such as console logs, from within the custom renderer component's setup function - when running from a vite build.

yaffol commented 1 year ago

Duplicate of https://github.com/eclipsesource/jsonforms/issues/2077 and covered in https://jsonforms.discourse.group/t/custom-renderers-not-rendering/1250/7.

I've opened a PR to add some details about how to use custom renderers to the readme https://github.com/eclipsesource/jsonforms-vuetify-renderers/pull/98