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

feat: allow fallback on bundle fail #255

Merged
merged 10 commits into from
Sep 13, 2024
Merged

feat: allow fallback on bundle fail #255

merged 10 commits into from
Sep 13, 2024

Conversation

huang-julien
Copy link
Member

@huang-julien huang-julien commented Sep 8, 2024

πŸ”— Linked issue

#233

❓ 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)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR allows failed script bundle to fallabck to remote loading. it:

  • moves the copy file process into the transform plugin
  • add new fallbackOnSrcOnBundleFail ( ➑️ better naming welcomed)
  • try to download the script during transformation. Throw if fallbackOnSrcOnBundleFail is not enabled, replace the url by the original src if it is enabled

Copy link

vercel bot commented Sep 8, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
scripts-docs βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Sep 13, 2024 10:32am
scripts-playground βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Sep 13, 2024 10:32am

@harlan-zw
Copy link
Collaborator

Thank you, nice work πŸ™Œ

Would you mind adding this config to the docs under https://github.com/nuxt/scripts/blob/main/docs/content/docs/3.api/5.nuxt-config.md

@huang-julien
Copy link
Member Author

done πŸ‘

@harlan-zw harlan-zw deleted the feat/fallback_remote_ branch September 13, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants