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

move nonstandard into exports #360

Merged
merged 2 commits into from
Dec 31, 2023
Merged

Conversation

koush
Copy link
Collaborator

@koush koush commented Dec 17, 2023

Building on previous change. #359

The primary goal is to remove mp4box as an automatically included dependency, which is large, and also pulls in a significant portion of lodash.

import nonstandard from "werift/nonstandard";

This requires module resolution node 16 set in tsconfig when used by typescript. which shouldn't be a problem since this library requires node 16 anyways.

https://stackoverflow.com/a/72275458

@koush
Copy link
Collaborator Author

koush commented Dec 18, 2023

it's also possible to achieve different behavior (or preserve legacy behavior) by using different entry points for main vs exports.

@koush
Copy link
Collaborator Author

koush commented Dec 19, 2023

Another option would be to publish the nonstandard stuff in a totally different package, as @werift/nonstandard. This would eliminate the dependencies altogether at compile time, which may have scripts that run during install.

I think the current pull request is the least painful transition though.

@shinyoshiaki
Copy link
Owner

@koush I have created another PullRequest with improved writing of the exports field and would appreciate a review of that one.

#361

@koush
Copy link
Collaborator Author

koush commented Dec 28, 2023

looks good to me

@shinyoshiaki shinyoshiaki merged commit b3ce6d4 into shinyoshiaki:develop Dec 31, 2023
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