Skip to content

Commit 9f0afa3

Browse files
authored
fix: use the file suffix when importing with relative paths (#18)
In my project Node complains: "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'." Since other relative imports use the suffix, I thought it would help to import libxml2raw also with the suffix.
1 parent 146e9ad commit 9f0afa3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/disposable.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Pointer } from './libxml2raw';
1+
import type { Pointer } from './libxml2raw.js';
22
import './disposeShim.mjs';
33
import './metadataShim.mjs';
44

src/document.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from './libxml2.mjs';
1010
import { XmlElement, XmlNode } from './nodes.mjs';
1111
import { XmlXPath, NamespaceMap } from './xpath.mjs';
12-
import type { XmlDocPtr } from './libxml2raw';
12+
import type { XmlDocPtr } from './libxml2raw.js';
1313
import { disposeBy, XmlDisposable } from './disposable.mjs';
1414

1515
export enum ParseOption {

src/validates.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import type {
2323
XmlRelaxNGPtr,
2424
XmlSchemaParserCtxtPtr,
2525
XmlSchemaPtr,
26-
} from './libxml2raw';
26+
} from './libxml2raw.js';
2727
import { disposeBy, XmlDisposable } from './disposable.mjs';
2828

2929
export class XmlValidateError extends XmlError {}

0 commit comments

Comments
 (0)