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

fix(vite): sanitize client asset chunk names - #7067

Merged
pi0 merged 1 commit into
mainfrom
fix/sanitize-assets
Aug 30, 2022
Merged

fix(vite): sanitize client asset chunk names#7067
pi0 merged 1 commit into
mainfrom
fix/sanitize-assets

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14740

❓ 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 sanitizes asset filenames as well as chunks, and also fixes an issue where we were mutating the shared config (and therefore affecting server) but not the client.

📝 Checklist

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

@danielroedanielroe added bug Something isn't working vite 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Aug 30, 2022
@danielroe
danielroe requested a review from pi0August 30, 2022 12:52
@danielroedanielroe self-assigned this Aug 30, 2022
@netlify

netlifyBot commented Aug 30, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commita0e9c9e
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/630e08014f2ea200088b9e33

pi0
pi0 approved these changes Aug 30, 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. We might to do same normalization for server chunk names too. Maybe we can refactor same PR?

@danielroe

Copy link
Copy Markdown
MemberAuthor

Server (and other JS) chunk names are already being sanitized:

output: {sanitizeFileName: sanitizeFilePath}

@pi0pi0 changed the title fix(vite): sanitize asset filenames as wellfix(vite): sanitize client asset chunk namesAug 30, 2022
@pi0
pi0 merged commit fd6d1d4 into mainAug 30, 2022
@pi0
pi0 deleted the fix/sanitize-assets branch August 30, 2022 13:13
@pi0pi0 mentioned this pull request Sep 1, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usagevite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic Routes generating invalid css filename for ApiGateway

2 participants

@danielroe@pi0