fix: add support for SSR in DeviceHelperPlugin#249
fix: add support for SSR in DeviceHelperPlugin#249Bojan Rajh (bojanrajh) wants to merge 6 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Nils Haberkamp (Haberkamp)
left a comment
There was a problem hiding this comment.
Please add a changelog
examples/nuxt-app/app.vue
Outdated
There was a problem hiding this comment.
Though this is enough to test that the DeviceHelper is SSR compatible, I suggest to make this component do something like switching between content. This way we can be sure that switching views also works when using SSR. Additionally it creates a nicer demo page.
There was a problem hiding this comment.
Ideally, a full integration test would be needed here. But. We did end up with a few composables which I would like to introduce in separate PRs, maybe even a separate package (@shopware-ag/meteor-nuxt):
useMeteorTabs- framework-agnostic, might as well end up in@shopware-ag/meteor-component-libraryuseMeteorToast,useMeteorModal(depends on Nuxt'suseState)useMeteorForm- provides a layer betweenjoi(and compatible) and shopware/meteor validation format, along with a few nuxt-based form components based on meteor componentsuseColorMode- composable for managing system/light/dark modes based on meteor dark theme implementation (html attr).
Therefore, I would like to keep those PRs small and update the implementation (for example in the mt-toast.stories.ts and nuxt-app demo) along the way.
08859db to
3148cc5
Compare
What?
This PR updates nuxt-app example with
MtTabscomponent which is usingDeviceHelperplugin + it activates SSR.Why?
To allow server-side rendering when
DeviceHelperis used.How?
By checking for the
windowvariable.Testing?
Locally, with provided nuxt-app example.
Screenshots (optional)
Anything Else?