app.js script chunk rendered twice
See original GitHub issueHi, i’m using v0.6.0.
i’m facing the issue that the app.js chunk is rendered twice: renderScripts() renders the <script src="...../app.js" defer> into the index.ssr.html and the htmlPlugin included in vue-cli-plugin-ssr renders <script src=".../app.js"> as well into the markup, such that it gets loaded twice by the browser and vue gets hydrated twice as well.
<body>
....
<script src="/de/suche/app.js" defer></script>
<script type="text/javascript" src="/de/suche/app.js"></script>
</body>
https://webpack.js.org/plugins/html-webpack-plugin/ states:
The plugin will generate an HTML5 file for you that includes all your webpack bundles in the body using script tags.
The specific code is: https://github.com/Akryum/vue-cli-plugin-ssr/blob/master/lib/webpack.js#L54
If i add chunks: []
there, it works fine again, such that it is no longer rendered twice.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5
Top Results From Across the Web
Why is my Remix app rendering twice without any outlets?
My Remix app seems to be rendered twice, even when removing all routes and components. I'm a little unsure as to why.
Read more >Developers - app.js script chunk rendered twice - - Bountysource
Hi, i'm using v0.6.0. i'm facing the issue that the app.js chunk is rendered twice: renderScripts() renders the into the index.ssr.html and the...
Read more >All .js & .css (.vm) rendered twice on search issue page
In this app, we have added a web-panel on Jira issue details page. We have noticed our page is rendered twice on the...
Read more >React Components rendered twice — any way to fix this?
The reason why this happens is an intentional feature of the React.StrictMode . It only happens in development mode and should help to...
Read more >Synchronizing with Effects - React Docs
Every time your component renders, React will update the screen and then run the code inside useEffect . In other words, useEffect “delays”...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
actually it’s possible to fix it by only changing vue.config.js
You saved my day!
Just for reference, it also seemed to be causing following errors for me (both came after update to 0.6.0):
When I applied the fix for #160 problems disappeared.