Here's a rough overview of my project structure:
dist/
- helper.compiled.js
- entrypoint.compiled.js
src/
- helper.js
- entrypoint.js
As I was going through the npm publishing guidelines, I noticed they recommend providing a single index.js file. But do I really need to do this? Can't my entrypoint.compiled.js
simply require helper.compiled.js
? What advantages does a single index.js
file offer?
What's the best approach for publishing a library on npm in this scenario? I attempted to use npm pack
, but I'm still a bit unclear on its functionality.