Skip to content

Scripts loaded twice #221

@bgondy

Description

@bgondy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions