Skip to content

feat: allow fallback on bundle fail#255

Merged
harlan-zw merged 10 commits into
mainfrom
feat/fallback_remote_
Sep 13, 2024
Merged

feat: allow fallback on bundle fail#255
harlan-zw merged 10 commits into
mainfrom
feat/fallback_remote_

Conversation

@huang-julien
Copy link
Copy Markdown
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

@vercel
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Member Author

done 👍

@harlan-zw harlan-zw deleted the feat/fallback_remote_ branch September 13, 2024 12:14
zizzfizzix pushed a commit to zizzfizzix/nuxt-scripts that referenced this pull request Mar 5, 2026
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