I created a Node.js package and the files to be referenced by the user of this package reside in a dist
folder inside the package.
Now I don't want to use require('my-package/dist/feature')
but require('my-package/feature')
.
I set main
and files
to this in package.json
but when testing the package with npm link
locally, I still have to use require('my-package/dist/feature')
otherwise I get Cannot find module
errors.
package.json
:
"main": "dist",
"files": ["dist"],