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

fix(nuxt): treeshake client-only components with placeholders - #8789

Merged
danielroe merged 1 commit into
nuxt:mainfrom
huang-julien:fix/tree-shake.client
Feb 4, 2023
Merged

fix(nuxt): treeshake client-only components with placeholders#8789
danielroe merged 1 commit into
nuxt:mainfrom
huang-julien:fix/tree-shake.client

Conversation

@huang-julien

@huang-julienhuang-julien commented Nov 7, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvenuxt/nuxt#15396

❓ 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

Hi 👋 currently the tree-shake module does not treeshake .client components due to #7412 that adds ServerPlaceholder as .client components server side component.
This PR fix the RegexpMap of the treeshake module by adding a condition to verify that other.filePath is not the path to ServerPlaceholder.
btw this can be closed if #8713 pass

📝 Checklist

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

@codesandbox

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify

netlifyBot commented Nov 7, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit9fda582
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/636993e0566c89000801c2cd

@danielroedanielroe added bug Something isn't working 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Nov 15, 2022
@danielroedanielroe changed the title fix(nuxt): fix treeshake client-only module RegexpMapfix(nuxt): treeshake client-only components with placeholdersFeb 4, 2023
@danielroe
danielroe merged commit bf617c7 into nuxt:mainFeb 4, 2023
@danielroe

danielroe commented Feb 4, 2023

Copy link
Copy Markdown
Member

I do plan to merge the other PR but we shouldn't hold this one up. Thank you again! ❤️

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 usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

treeshake module does not treeshake .client components

2 participants

@huang-julien@danielroe