Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Day.js has great support for internationalization.
But none of them will be included in your build unless you use it.

```javascript
import 'dayjs/locale/es' // load on demand
import 'dayjs/locale/es.js' // load on demand

dayjs.locale('es') // use Spanish locale globally

Expand All @@ -90,7 +90,7 @@ dayjs('2018-05-05').locale('zh-cn').format() // use Chinese Simplified locale in
A plugin is an independent module that can be added to Day.js to extend functionality or add new features.

```javascript
import advancedFormat from 'dayjs/plugin/advancedFormat' // load on demand
import advancedFormat from 'dayjs/plugin/advancedFormat.js' // load on demand

dayjs.extend(advancedFormat) // use plugin

Expand Down
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ module.exports = {
loose: true
}
]
],
plugins: [
['add-import-extension', { extension: 'js' }]
]
}
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@semantic-release/github": "^11.0.4",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^22.4.3",
"babel-plugin-add-import-extension": "^1.6.0",
"babel-plugin-external-helpers": "^6.22.0",
"cross-env": "^5.1.6",
"eslint": "^4.19.1",
Expand Down