Akryum / vue-cli-plugin-ssr

:sparkles: Simple SSR plugin for Vue CLI
https://vue-cli-plugin-ssr.netlify.com/
MIT License
444 stars 69 forks source link

multiple run mounted() #170

Open mehrdadphp opened 4 years ago

mehrdadphp commented 4 years ago

hi guys.

All components run two times. I run console.log('test') in all components it is a print twice.

So far no one has encountered this problem Screenshot from 2019-12-29 12-10-21 ?

darkiron commented 4 years ago

Same probleme Some issue related this fact about webpack and vue-router

Visible on simple vue-cli and ssr-plugin.

Any ideas ?

Zacaria commented 4 years ago

It seems like the renderScripts function outputs the bundle as well as being output by replacing the placeholder

When you remove the {{{ renderScripts() }}} in the index.ssr.html your app is mounted only once.

But I'm actually looking to understand the possible side effect of removing the renderScripts

tarasbilohan commented 4 years ago

Duplicate of #158