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 want to use ssr and have a vue component that uses the SplideJS - vue package.
This package shouldn't load with ssr, since it dynamically adapts to screensizes etc.
I just want it to skip loading in ssr and beeing hydrated only clientside.
My attempts:
"ignoring it in the vite.config.mjs via "external" and "isCustomElement"
When I start the inertia-ssr server via php artisan inertia:start-ssr no error is received except in my firefox console:
[Vue warn]: Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.
Component that was made reactive:
Object { name: "Splide", emits: (27) […], components: {…}, props: {…}, setup: setup(props, context), render: _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options)
}
at <CCustomerService>
at <BasicStoreLayout>
I am building via "build": "vite build && vite build --ssr".
Everything works fine without ssr. Right now it is sliding too, but isn't responsive at all + the error is confusing me. I copied a lot of code from a fresh laravel project but unfortunately there's not a lot of docu about "disable packages for ssr"
Any ideas what's the correct way to make this work?
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
-
Hello Vite Masters,
I am using
I am trying to achieve the following:
I want to use ssr and have a vue component that uses the SplideJS - vue package.
This package shouldn't load with ssr, since it dynamically adapts to screensizes etc.
I just want it to skip loading in ssr and beeing hydrated only clientside.
My attempts:
"ignoring it in the
vite.config.mjs
via "external" and "isCustomElement"My main.js file
My ssr.js
In my component I tried:
When I start the inertia-ssr server via
php artisan inertia:start-ssr
no error is received except in my firefox console:I am building via "build": "vite build && vite build --ssr".
Everything works fine without ssr. Right now it is sliding too, but isn't responsive at all + the error is confusing me. I copied a lot of code from a fresh laravel project but unfortunately there's not a lot of docu about "disable packages for ssr"
Any ideas what's the correct way to make this work?
Beta Was this translation helpful? Give feedback.
All reactions