Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

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

Merged
merged 4 commits into from Sep 5, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/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.

@danielroe danielroe 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 pi0 September 5, 2022 13:25
@danielroe danielroe self-assigned this Sep 5, 2022
@netlify
Copy link

netlify bot commented Sep 5, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 1062139
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6315faa3f53df50008527ab0

Copy link
Member

@pi0 pi0 left a comment

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 main Sep 5, 2022
@pi0 pi0 deleted the feat/no-scripts branch September 5, 2022 13:46
This was referenced Sep 9, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x enhancement New feature or request 🍰 p2-nice-to-have Priority 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