You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
They are not in the ECMAScript spec as opposed to ESModules [3][4] for which support is being built into browsers[4] and Node[5]
What I propose is to use the main and module field in package.json to provide both ESM and CommonJS. This change is fully backwards compatible and can be achieved by using TypeScript, Webpack, or Rollup. I'd propose to go the TypeScript way which has the added benefit of type safety and allows ms to bundle types.
If you would accept this I could make a PR.
Reacted by Fabian Illner, kh3phr3n, Tomáš Vojtášek, p0358, Théo LUDWIG, novemb3r and Jimmy Wärting
Activity
theoludwig commentedon Jul 24, 2021
Great suggestion!:+1:
I would suggest that we rewrite the package in TypeScript, so we can include types declarations builtin and deprecate
@types/ms.