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(deps): restore compatibility with Next.js build #31

Merged
merged 4 commits into from
Jun 19, 2024

Conversation

Dam-Buty
Copy link
Contributor

@Dam-Buty Dam-Buty commented Jun 18, 2024

The Next.js build system was too aggressive in its tree shaking and removed mime-types from the bundle (required by form-data which is required by @literalai/client).

It was the dumbest thing as mime-types was declared as a dep despite not being imported anywhere in the code, while form-data was imported in the code but not declared as a dep. This didn't trigger any compile error as it is mainlined in Node (and presumed to exist by tsc/swc) but the build process messed the whole dependency graph and the error appeared at runtime.

Dam-Buty added 3 commits June 18, 2024 09:06

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Dam-Buty Dam-Buty changed the title chore: remove unused dependency mime-types fix(deps): restore compatibility with Next.js build Jun 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@clementsirieix clementsirieix self-requested a review June 19, 2024 09:46
Copy link
Contributor

@clementsirieix clementsirieix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Dam-Buty Dam-Buty merged commit 9a34167 into main Jun 19, 2024
2 checks passed
@Dam-Buty Dam-Buty deleted the dby/remove-mime-types branch August 1, 2024 15:04
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