vue-quill
vue-quill copied to clipboard
SSR with @vueup/vue-quill
Version @vueup/vue-quill version 1.2.0
Describe the bug Using this package with SSR gives an error:
/var/www/html/node_modules/quill/dist/quill.js:7661
var elem = document.createElement('div');
^
ReferenceError: document is not defined
To Reproduce Steps to reproduce the behavior:
- Install
LaravelwithInertiaandvite - Set up
SSRfromInertiadocs: https://inertiajs.com/server-side-rendering - Install
@vueup/vue-quill vite build --ssr- Set up component using the
Vue Quill-package - Run Laravel command to start ssr-server
php artisan inertia:start-ssr
Expected behavior I would expect SSR to work using this package.
Can send a snippet of your component that is using quill? I'm using it but have to force it under CSR because document is strictly a client-only element.
For now my quill looks like this:
<ClientOnly>
<div class="bg-white">
<QuillEditor theme="snow" toolbar="minimal" />
</div>
</ClientOnly>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.