fix - ts typings now export slugify correctly#19
Conversation
|
Thank you! 👍 |
|
Thanks for the fix, I chose commonjs export instead of es6 export because it was used in others browser/node modules exporting a single function (ex: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/haversine/index.d.ts). |
|
This change breaks the new Hopefully bundler module resolution with webpack + |
The change in simov#19 to switch to an ESM-style export seemed like the right solution at the time. However, module systems have evolved since then and the `export default` fails when "module": "node16" is configured in tsconfig.json Since `slugify` is a CommonJS module, it seems like using a CommonJS-style export is indeed the right choice for this package.
|
Reproduction of problem + PR to revert to CommonJS export: #171 |
This fixes the problem with Webpack + TS-Loader not working correctly after slugify added TS definitions.
Fixes #16