taoeffect / vue-script2

Standardized, designer-friendly <script> behavior for your Single Page App
171 stars 15 forks source link

VS2 isn't able to load scripts on client side render #35

Open Ornhoj opened 5 years ago

Ornhoj commented 5 years ago

Hi

I have tried to implement VS2 in my setup and i'm having issues with making it work as hoped.

My setup is a SPA with SSR abilities (based on VueHackernews demo). First time the script is running and the desired service is loaded, then navigating away and back will cause the service to do nothing.

I have tried the <script2 unload src="...." way and the

VueScript2.load('service.js').then(() => { console.log('loaded') });

Same result both times.

This is the service I'm testing with: <div data-widget-url="https://septima.dk/widget/config/layer.json"></div> <script src="https://widgetconfig.septima.dk/widgetconfig.js"></script>

Is there a way to force redownload or rerender/-load in vuescript2?

hemanthgk10 commented 5 years ago

I am having similar issue when changing layout, the JS files doesn't render after router redirection. Not sure if any one having similar issues.

axdyng commented 5 years ago

I am having similar issue when client-side renders the page.

ghost commented 5 years ago

It seems that no one cares about this problem.

taoeffect commented 5 years ago

It seems that no one cares about this problem.

Happy to accept quality PRs.