Skip to content

Commit c2d3845

Browse files
authored
Merge pull request #796 from nextcloud-libraries/fix/make-module-resolution-explicit
fix: Add explicit file extension to fix module resolution with Webpack
2 parents 0161423 + 3b1a9f5 commit c2d3845

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

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

5+
## 1.3.1 - 2024-01-10
6+
### Fixed
7+
* Fixed module resolution when using webpack + babel
8+
59
## 1.3.0 - 2024-01-10
610
### Enhancements
711
* enh: Move package to vite for bundling + compress translations [#781](https://github.com/nextcloud-libraries/nextcloud-moment/pull/781) \([susnux](https://github.com/susnux)\)

lib/constants.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ interface Translations {
44
}
55

66
declare const LOCALES: Translations[]
7+
8+
declare module 'moment/min/moment-with-locales.js' {
9+
import moment from 'moment'
10+
export default moment
11+
}

lib/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import moment from 'moment/min/moment-with-locales'
1+
import moment from 'moment/min/moment-with-locales.js'
22
import Gettext from 'node-gettext'
33
import { getLocale } from '@nextcloud/l10n'
44

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nextcloud/moment",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Customized moment.js for Nextcloud",
55
"main": "dist/index.cjs",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)