hustcc / timeago.js

:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.
https://timeago.org
MIT License
5.29k stars 411 forks source link

Fix sourceMap support on package #256

Open cmdcolin opened 2 years ago

cmdcolin commented 2 years ago

Fixes https://github.com/hustcc/timeago.js/issues/240

This is something I have found when publishing my packages to NPM, the src directory is published to NPM which the .map files refer to. There might be some alternative way to embed sourceMap src or something, but this solution has worked for me! Thanks for this package

cmdcolin commented 1 year ago

note that another alternative is just not doing any source map for this package. it may be ok. in that case, remove sourceMap:true from tsconfig https://github.com/hustcc/timeago.js/blob/master/tsconfig.json#L8