Skip to content

Conversation

@Simek
Copy link

@Simek Simek commented Sep 13, 2025

Description

While working on adding a new metadata information to the React Native Directory, and analysing the results, I have spotted that react-native-orientation-locker published package includes example apps files, which increase significantly the final bundle size, see:

To avoid that, I have updated the .npmignore file, and added exclusion for the example directory.

Test plan

I have run the npm pack --dry-run command before and after the changes, and make sure that tests file are no longer a part of the final bundle.

Results are as follows, before the change:

npm notice filename: react-native-orientation-locker-1.7.0.tgz
npm notice package size: 244.5 kB
npm notice unpacked size: 499.6 kB
npm notice shasum: 2f9a234f560b533f735be065e6164e098d375dda
npm notice integrity: sha512-6zV/lCjtzcsH/[...]RqdZmiUXWwg9w==
npm notice total files: 129

After excluding example files:

npm notice filename: react-native-orientation-locker-1.7.0.tgz
npm notice package size: 26.2 kB
npm notice unpacked size: 128.0 kB
npm notice shasum: d9cf697245bcca29b0f0ae7cd2ff470fbc3a380b
npm notice integrity: sha512-WmHoDcm3usAiZ[...]4294YjMeWwfnA==
npm notice total files: 42

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.

1 participant