Skip to content

Commit

Permalink
Merge pull request #796 from nextcloud-libraries/fix/make-module-reso…
Browse files Browse the repository at this point in the history
…lution-explicit

fix: Add explicit file extension to fix module resolution with Webpack
  • Loading branch information
susnux authored Jan 10, 2024
2 parents 0161423 + 3b1a9f5 commit c2d3845
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## 1.3.1 - 2024-01-10
### Fixed
* Fixed module resolution when using webpack + babel

## 1.3.0 - 2024-01-10
### Enhancements
* enh: Move package to vite for bundling + compress translations [#781](https://github.com/nextcloud-libraries/nextcloud-moment/pull/781) \([susnux](https://github.com/susnux)\)
Expand Down
5 changes: 5 additions & 0 deletions lib/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ interface Translations {
}

declare const LOCALES: Translations[]

declare module 'moment/min/moment-with-locales.js' {
import moment from 'moment'
export default moment
}
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from 'moment/min/moment-with-locales'
import moment from 'moment/min/moment-with-locales.js'
import Gettext from 'node-gettext'
import { getLocale } from '@nextcloud/l10n'

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nextcloud/moment",
"version": "1.3.0",
"version": "1.3.1",
"description": "Customized moment.js for Nextcloud",
"main": "dist/index.cjs",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit c2d3845

Please sign in to comment.