Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue2 does not render at all in prod #1753

Closed
awaigand opened this issue May 17, 2021 · 4 comments · Fixed by #1755
Closed

Vue2 does not render at all in prod #1753

awaigand opened this issue May 17, 2021 · 4 comments · Fixed by #1755
Milestone

Comments

@awaigand
Copy link

Describe the bug
In Vue2.X nothing gets rendered when you build the project in production. This even goes for the seed project. There are no errors.
It does work when you just do "npm run serve" instead of "build", i.e. in development mode.

To Reproduce

  1. Checkout vue2 seed branch/repo
  2. npm ci
  3. npm run build
  4. npx http-server dist or similar.

Expected behavior
The form gets rendered.

Screenshots

grafik

There are no errors in the console whatsover, but the form does not render.

Browser (please complete the following information):

  • Most recent firefox and chrome (and probably all others).

Used Setup (please complete the following information):

  • Framework: Vue2
  • RendererSet: Vanilla

Thank you!

@sdirix
Copy link
Member

sdirix commented May 18, 2021

Thanks for the report. I can confirm that we can reproduce the issue. We'll take a look soon!

@sdirix sdirix added this to the 3.0 milestone May 18, 2021
@sdirix sdirix linked a pull request May 20, 2021 that will close this issue
@sdirix sdirix modified the milestones: 3.0, 2.5.2 May 20, 2021
@sdirix
Copy link
Member

sdirix commented May 20, 2021

Debugging this is quite difficult as there seems to be a problem with the production build of Vue 2 only, i.e. it works with --mode development. It seems the dispatch renderer is correctly invoked, the layout renderer is triggered and successfully finishes its setup routine. Then something bad happens internally in Vue and the rendering process is stopped with a function rendered as a comment into the DOM. This function is Vue's createElement.

Building @jsonforms/vue2 and @jsonforms/vue2-vanilla as CommonJS modules instead of ESM seems to fix the problem for now. We'll take a look at this again with #1722.

We published the fix as a prerelease (v2.5.2-alpha.0). You can consume it via npm install --save @jsonforms/core@next @jsonforms/vue2@next @jsonforms/vue2-vanilla@next.

@awaigand
Copy link
Author

Thank you ,
this seems to do the trick and works in our production app as well 👍

Thanks again, especially for the incredibly quick work.

@glockenbach
Copy link

We published the fix as a prerelease (v2.5.2-alpha.0). You can consume it via npm install --save @jsonforms/core@next @jsonforms/vue2@next @jsonforms/vue2-vanilla@next.

I had the same problem but happily found out that this is now released:
@jsonforms/core@2.5.2, @jsonforms/vue2@2.5.2 and @jsonforms/vue2-vanilla@2.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants