Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

feat(nuxt): support experimental flag to render no client-side js - #7248

Merged
pi0 merged 4 commits into
mainfrom
feat/no-scripts
Sep 5, 2022
Merged

feat(nuxt): support experimental flag to render no client-side js#7248
pi0 merged 4 commits into
mainfrom
feat/no-scripts

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14765

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This allows turning off all Nuxt-injected JS (preload/prefetch <link> and <script>). It does not affect user code, which can still inject scripts. It does remove all scripts from buildDir, though perhaps this could be reconsidered in future? (wdyt @pi0?)

Warning
This will only be advisable for the very small minority of sites that would not benefit from client-side JS.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroedanielroe added enhancement New feature or request 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Sep 5, 2022
@danielroe
danielroe requested a review from pi0September 5, 2022 13:25
@danielroedanielroe self-assigned this Sep 5, 2022
@netlify

netlifyBot commented Sep 5, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit1062139
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/6315faa3f53df50008527ab0

Comment threadpackages/nuxt/src/core/nuxt.ts
Comment threadpackages/nuxt/src/core/runtime/nitro/renderer.ts Outdated
pi0
pi0 approved these changes Sep 5, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to try!

@pi0
pi0 merged commit cc87d2a into mainSep 5, 2022
@pi0
pi0 deleted the feat/no-scripts branch September 5, 2022 13:46
This was referenced Sep 9, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xenhancementNew feature or request🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow disabling client-side JS entirely

2 participants

@danielroe@pi0