barrsan / react-native-simple-image-cropper

MIT License
59 stars 28 forks source link

wrong index.js path in package #10

Closed almorak closed 4 years ago

almorak commented 4 years ago

package json : ... "main": "build/index.js", ...

but there is no build folder, need to manually change it to "main": "src/index.js",

barrsan commented 4 years ago

Hello @almorak! The build directory is placed in .gitignore, because it makes no reasons to put it in this repository.

From the npm documentation:

The main field is a module ID that is the primary entry point to your program. That is, if your package is named foo, and a user installs it, and then does require("foo"), then your main module’s exports object will be returned.

The build directory is published in the npm repository. You can check the .npmignore file and make sure that it does not include the build directory path.

If you need the build directory, you can build the package using the npm run build command.

If use "main": "src/index.js", then when we import the package into the target file from node_modules, the dev version will be used.