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
I'm looking for some advice on using the runtime compiler to render Vue 3 elements in the browser with Django 5.0.1. Django handles the backend and uses static html files to display the information to the user. With Vue 2, I was able to set runtimeCompiler: true, but this isn't supported with Vue 3 and Vite. I followed this discussion in the Vite repo on GitHub as it describes the problem I'm having, but after making all the necessary changes, the Vue components don't get rendered in the browser.
If I inspect the element in the developer console, I can see the element that should be displayed on the screen, it's nested in a #document_fragment element. I seem to be missing a step that I can't seem to find in the documentation. Can anyone share any insight as to what I am missing or share any resources that might give me the information I need? Any resources I've found so far were either Vue 2 related or didn't solve my issue. I've included all the relevant code snippets but if you need to see anything else please let me know. Thanks in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm looking for some advice on using the runtime compiler to render Vue 3 elements in the browser with Django 5.0.1. Django handles the backend and uses static html files to display the information to the user. With Vue 2, I was able to set
runtimeCompiler: true,
but this isn't supported with Vue 3 and Vite. I followed this discussion in the Vite repo on GitHub as it describes the problem I'm having, but after making all the necessary changes, the Vue components don't get rendered in the browser.If I inspect the element in the developer console, I can see the element that should be displayed on the screen, it's nested in a
#document_fragment
element. I seem to be missing a step that I can't seem to find in the documentation. Can anyone share any insight as to what I am missing or share any resources that might give me the information I need? Any resources I've found so far were either Vue 2 related or didn't solve my issue. I've included all the relevant code snippets but if you need to see anything else please let me know. Thanks in advance!Element in the developer console:
package.json:
vite.conf.js:
main.js:
base.html:
Beta Was this translation helpful? Give feedback.
All reactions