-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Size is too large ( it that possiable to have less then 1MB package size ) #13
Comments
This packages is actually very small and I take great care to make sure that it stays that way. See https://bundlephobia.com/package/@hyperjump/json-schema@0.18.3 for a more accurate assessment than what you see on npmjs.com. The current version is about 150KB raw, 79KB minified, and 13KB compressed. The reason it appears to be so big is because I package several pre-built bundles in different formats for people who aren't using bundlers can include the package using unpkg: https://unpkg.com/browse/@hyperjump/json-schema@0.18.3/dist/. These builds will not be included when this code gets bundled into your app. |
Hi @jdesrosiers, Thanks for your response. But we are using this package in our Node.js Project ( package version is @hyperjump/json-schema@0.11.1 ). After deployment, this project in AWS lambda shows project size is more then 3.2 MB. Because of this https://bundlephobia.com/package/@hyperjump/json-schema@0.11.1 Can please help me on this. |
Ah, now it makes sense. It would be that large on disk. I never thought of that as an issue, but I assume AWS lambda has limits on how big a lambda can be. I'm not sure what can be done about that other than removing the pre-built bundles, but I'm not sure I want to do that. I might be able to do something with a postinstall script that deletes the "dist" directory, but I don't know if that would work. I'll look into it and see if there's anything I can do. |
I added a postinstall script to remove the dist directory and it seems to work. The pre-bundled distributions are still available on unpkg and the final size in node_modules including dependencies is under 600KB. The Give it a try with version |
Thanks, @jdesrosiers. Now I can see the Package size reduce. But this works on pipeline & Linux, not in Windows right? |
Worked |
Worked For Me ( in Linux, But not in Windows ). Maybe it's fine if you just provide steps to write a post-install script in their owner project. instead of doing here. |
Thanks for checking. I always forget windows exists. I'm pretty sure I know what I have to do to make it work everywhere. |
The text was updated successfully, but these errors were encountered: