Ship cleaner packages (without the ./dist or ./src folder) by publishing a subfolder to NPM

24 days ago by codeinabox to c/javascript

One detail that has always bugged me about publishing a package to NPM is how build output paths like dist/ can leak into the public API.Turns out, npm publish can do it, but to make it work seamlessly in a real-world project, you need a few extra pieces in place. Let me walk you through how it works.
javascript
javascript

@programming.dev

login for more options
2830
357
51

go to feed...