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
Hi @yyx990803
Some service integrations require an embedded script inside the vue instance. This is per default not allowed, but with packages like vue-script2 it is possible - however.
Integrating a third party script inside the vue instance will only allow it to load on the first page load both SSR loaded and CSR. The only way I have found to hack this issue is to apply some information about the current page contains a "unsupported" script and force a SSR by window.location.replace in the beforeRouteUpdate navigation guard.
Is there a way to implement third party scripts provided by some companies, that will load every time?
I have used the following as a base for testing in both in Vue CLI and Vue-Hackernews 2.0 boilerplate.
Hi @yyx990803
Some service integrations require an embedded script inside the vue instance. This is per default not allowed, but with packages like
vue-script2
it is possible - however.Integrating a third party script inside the vue instance will only allow it to load on the first page load both SSR loaded and CSR. The only way I have found to hack this issue is to apply some information about the current page contains a "unsupported" script and force a SSR by
window.location.replace
in thebeforeRouteUpdate
navigation guard.Is there a way to implement third party scripts provided by some companies, that will load every time?
I have used the following as a base for testing in both in Vue CLI and Vue-Hackernews 2.0 boilerplate.
This perticular case can be hacked but the issue still prevails if only a script-tag is provided which has to be placed in context.
I personally see this as a missing part of Vue if my case is unsupported.
Cheers
The text was updated successfully, but these errors were encountered: