frouo / next-markdown

Markdown Pages for Next.js with 0 effort, dynamic routes and your layout design
https://twitter.com/nextmarkdown
117 stars 5 forks source link

[FIX] - Library ESModule build #10

Closed edvincandon closed 2 years ago

edvincandon commented 2 years ago

Typescript supports .js imports for .ts files. see why here : https://github.com/microsoft/TypeScript/issues/16577#issuecomment-754941937

Either that or :

frouo commented 2 years ago

Good to know: https://github.com/frouo/next-markdown/pull/8#issuecomment-1082327722

I've added a test but sadly it fails because the "github-slugger" module is undefined when the test is executed .. needed to mock it in order to create the test

do you maybe know why this is the case? did you have similar problems that node_module packages are undefined in tests?