Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts loaded twice #221

Open
bgondy opened this issue Aug 17, 2020 · 1 comment
Open

Scripts loaded twice #221

bgondy opened this issue Aug 17, 2020 · 1 comment

Comments

@bgondy
Copy link

bgondy commented Aug 17, 2020

Javascript assets seems to be imported twice, once with defer attribute, once without.

Here is an extract of the SSR response with a newly created project :

<!doctype html>
<html lang="en">
<head>
    <!-- ... -->
</head>
<body>
<!-- ... -->
<script>window.__INITIAL_STATE__ = {};
(function () {
    var s;
    (s = document.currentScript || document.scripts[document.scripts.length - 1]).parentNode.removeChild(s);
}());</script>

<script src="/js/chunk-vendors.4c7946b4.js" defer></script>
<script src="/js/app.674bf3a8.js" defer></script>
<script src=/js/chunk-vendors.4c7946b4.js></script>
<script src=/js/app.674bf3a8.js></script>
</body>
</html>

Those with defer attribute seems to be added with the renderScripts() function in vue-server-renderer but I can't find where the other script are added.

@nrgnrg
Copy link

nrgnrg commented Sep 3, 2020

could be related to #158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants