a /dist (with definition) and src files in the npm package so people using TS can do do import from 'library' and people using js can do const = require("library/dist") without needing to compile it themselves. is that bad practice ? I didn't find other TS packages doing that.
You should do "main": "dist" instead and not publish src to npm
but that wouldn't publish the source only the generated stuff is that fine ?.
Just add declaration: true to tsconfig
Only the generated JS and d.ts is fine, and is the recommended way
"declarationMap": true needs the source tho
Обсуждают сегодня