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

full static doesn't respect injectScripts: false #8866

Closed
danielroe opened this issue Feb 20, 2021 — with Volta.net · 0 comments · Fixed by #8912
Closed

full static doesn't respect injectScripts: false #8866

danielroe opened this issue Feb 20, 2021 — with Volta.net · 0 comments · Fixed by #8912

Comments

Copy link
Member

Versions

  • nuxt: 2.15.1
  • node: v14.15.5

Reproduction

export default {
  target: 'static',
  render: {
    injectScripts: false,
    resourceHints: false
  }
}

Running yarn generate renders:

<!DOCTYPE html>
<html data-n-head-ssr>
  <head>
    <!-- ... -->
    <link rel="preload" href="/_nuxt/static/1613840478/state.js" as="script" />
    <link rel="preload" href="/_nuxt/static/1613840478/payload.js" as="script" />
    <link rel="preload" href="/_nuxt/static/1613840478/manifest.js" as="script" />
  </head>
  <body>
    <!-- ... -->
    <script defer src="/_nuxt/static/1613840478/state.js"></script>
  </body>
</html>

These scripts should not be injected.

See also #8178 (staled out).

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

Successfully merging a pull request may close this issue.

1 participant