When and where can I at the earliest use the platform plugin? #8999
-
I tried to import the platform detection into the router-folders index.js but the platform.is object doesn't seem to be populated at this stage. What I want to achieve is to use two separate sets of routes depending on platform. Is this achievable? Grateful for any ideas or input! Here is my route-function:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Assuming we're talking about Qv2: Just pushed a commit (will be available in Quasar v2.0.0-beta.13) which prepares the Platform as early as possible (even before this Quasar Plugin getting installed). Will work for your case too (on non-SSR builds). Before this commit, the earliest that Platform can be used is after it gets installed, along with all the other Quasar Plugins. Which unfortunately is when q/app calls |
Beta Was this translation helpful? Give feedback.
Assuming we're talking about Qv2:
Just pushed a commit (will be available in Quasar v2.0.0-beta.13) which prepares the Platform as early as possible (even before this Quasar Plugin getting installed). Will work for your case too (on non-SSR builds).
Before this commit, the earliest that Platform can be used is after it gets installed, along with all the other Quasar Plugins. Which unfortunately is when q/app calls
app.use(Quasar)
and right before the Vue app gets instructed to start mounting (app.mount('#q-app')
).