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

fix: ensure lodash is optimized in every monorepo package #4005

Merged
merged 1 commit into from Dec 21, 2022

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Dec 21, 2022

Description

The fix in #3974 were not sufficient.

Running this:

const {renderStudio} = await import('https://esm.sh/sanity@3.1.0')

Throws:

Uncaught SyntaxError: The requested module '/v99/lodash@4.17.21/es2022/lodash.js' does not provide an export named 'flatMap' (at schema.js:formatted:2:178)

This is because only sanity is optimizing lodash imports, and other packages like @sanity/schema aren't.

What to review

Since it's just an optimisation step it shouldn't break any existing behaviour or introduce new behaviour, beyond a smaller bundle size.

Notes for release

  • fix: optimize lodash imports in the rest of the monorepo packages (@sanity/schema and more)

@stipsan stipsan requested a review from rexxars December 21, 2022 16:48
@vercel
Copy link

vercel bot commented Dec 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Dec 21, 2022 at 4:52PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
studio-workshop ⬜️ Ignored (Inspect) Dec 21, 2022 at 4:52PM (UTC)

@rexxars rexxars merged commit 8494ac0 into next Dec 21, 2022
@rexxars rexxars deleted the fix-every-lodash branch December 21, 2022 21:12
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.

None yet

2 participants