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

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

Merged
merged 1 commit into from Aug 30, 2022
Merged

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

merged 1 commit into from Aug 30, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

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

@danielroe danielroe 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 pi0 August 30, 2022 12:52
@danielroe danielroe self-assigned this Aug 30, 2022
@netlify
Copy link

netlify bot commented Aug 30, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit a0e9c9e
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/630e08014f2ea200088b9e33

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. We might to do same normalization for server chunk names too. Maybe we can refactor same PR?

@danielroe
Copy link
Member Author

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

output: { sanitizeFileName: sanitizeFilePath }

@pi0 pi0 changed the title fix(vite): sanitize asset filenames as well fix(vite): sanitize client asset chunk names Aug 30, 2022
@pi0 pi0 merged commit fd6d1d4 into main Aug 30, 2022
@pi0 pi0 deleted the fix/sanitize-assets branch August 30, 2022 13:13
@pi0 pi0 mentioned this pull request Sep 1, 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 bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage vite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic Routes generating invalid css filename for ApiGateway
2 participants