iamkun / iamkun/dayjs

t is not defined

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

Description

```
Uncaught TypeError: t is undefined
http://unpkg.com/dayjs@1.8.21/dayjs.min.js:1
http://unpkg.com/dayjs@1.8.21/dayjs.min.js:1
dayjs.min.js:1:144
http://unpkg.com/dayjs@1.8.21/dayjs.min.js:1
http://unpkg.com/dayjs@1.8.21/dayjs.min.js:1
InnerModuleEvaluation self-hosted:2371
InnerModuleEvaluation self-hosted:2371
evaluation self-hosted:2332

```

here is the code

```
import * as dayjs from '//unpkg.com/dayjs@1.8.21/dayjs.min.js';`

console.log(dayjs(new Date()).fromNow())

```

Doing this inside a web component in firefox.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Firefox web-component example using the dayjs@1.8.21 URL and the shown import from dayjs.min.js. Inspect the published bundle and module-loading behavior; done means the import no longer raises “t is undefined” and the example can call dayjs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.