learn-a icon indicating copy to clipboard operation
learn-a copied to clipboard

.npmignore can contain src/

Open chrismcleod opened this issue 7 years ago • 3 comments

Ignoring the src folder in .npmignore reduces package size.

Someone at MS knows haha: https://github.com/Microsoft/TypeScript/blob/master/.npmignore

chrismcleod avatar Jul 20 '18 23:07 chrismcleod

tsconfig.json as well, for that matter :)

lufzle avatar Jul 25 '18 09:07 lufzle

Depending on the build, sometimes source-maps reference the source files, and unless you publish /src these will not work.

Izhaki avatar Dec 27 '18 14:12 Izhaki

Yeah just chiming in here, for most libs it's best-practice to ship source code to npm too. If your codebase is massive, like Microsoft/TypeScript likely is, I can see why you'd want to avoid it.

zackkrida avatar Mar 20 '19 17:03 zackkrida