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

fix(nuxt): tree-shake devtools from production bundle #6538

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Aug 11, 2022

Resolves nuxt/nuxt#14548

πŸ”— Linked issue

❓ 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

vue-router, uses new esm export conditions (dev, prod) which solved to remove devtools from production bundle in #5874 but other dependencies such as vue-i18n, with their bundler dist depend on special __VUE_PROD_DEVTOOLS__ flag. This PR explicitly sets it to remove from final nitro bundle.

Note: We still need to fix @vue/devtools-api mock to avoid conditions it is leaked for any other reason.

πŸ“ Checklist

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

@netlify
Copy link

netlify bot commented Aug 11, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit c303092
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62f581e239148500086aa37f

@pi0 pi0 merged commit b0bf25c into main Aug 11, 2022
@pi0 pi0 deleted the fix/vue-prod-devtools branch August 11, 2022 22:33
@pi0 pi0 mentioned this pull request Aug 11, 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
Projects
None yet
2 participants