iamkun / iamkun/dayjs

dayjs plugin configuration in angular library

Open
#2,311 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

Hi all

i'm implementing a library that uses dayjs for some date manipulation

in order to overcome a build error (Property 'duration' does not exist on type 'typeof import("C:/lavoro/workspace/ngx-dmi-uikit/node_modules/dayjs/esm/index.d.ts"))
i need to import the duration plugin, and i do so in my library, and it builds fine.

problem is that if the client application doesn't do it explictly too it throws the error
isn't there a way to propagate dayjs configuration loaded in the library to the client app? (I provide the forRoot pattern in order to override such configuration)

thank you in advance

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the build and runtime behavior with the Angular library and its client application, then inspect how the duration plugin and forRoot configuration are applied. There are no files or tests named in the issue; done would require an agreed, supported way to propagate the configuration or a documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.