Describe the bug
module field in package.json points to minified version of the library.
Also causes issues when using npm link across modules for development (minified file cannot be found / imported)
Expected behavior
module field should point to the esm distribution so that it can be imported by consuming projects and tree-shaken / imported correctly.
Information
We have a related issue.
https://github.com/iamkun/dayjs/pull/495/commits/23f9f3dd57664c06f885fcbcf978f1dafbb69ee8
Ah okay - this is catching a few people out / deterring them from using the module.
Not sure if there is a "proper" fix for this as I'm no expert. I'll switch to dayjs/esm for now.
Yes, you could switch to dayjs/esm at this time.
When I try to use dayjs/esm (import * as dayjs from 'dayjs/esm') or (import dayjs from 'dayjs/esm') in VS Code angular project it says
Could not find a declaration file for module 'dayjs/esm'. '**/node_modules/dayjs/esm/index.js' implicitly has an 'any' type.
Trynpm install @types/dayjsif it exists or add a new declaration (.d.ts) file containingdeclare module 'dayjs/esm';
@iamkun Anyway, I think we shouldn't provide error format distribution (cjs or umd) for the module field, if so, Why not remove the module field?

Most helpful comment
When I try to use dayjs/esm (import * as dayjs from 'dayjs/esm') or (import dayjs from 'dayjs/esm') in VS Code angular project it says