Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type definitions for moduleResolution nodenext #70

Merged

Conversation

trygveaa
Copy link
Contributor

When importing this library in a project using moduleResolution nodenext, the types would give errors because the import paths were missing the file extension which is required for moduleResolution nodenext. Therefore we have to add .js to all imports of local files.

See developit/microbundle#1019 (comment) and the issues that comment links to for some more detailed explanation of this.

I also changed moduleResolution to nodenext in the tsconfig because when it's set to node, typescript won't give errors for missing file extensions which means they are easy to forget. With it set to nodenext, you will get an error if an import is missing the file extension. As far as I can see, changing this doesn't change the build output.

When importing this library in a project using moduleResolution
nodenext, the types would give errors because the import paths were
missing the file extension which is required for moduleResolution
nodenext. Therefore we have to add .js to all imports of local files.

See developit/microbundle#1019 (comment)
and the issues that comment links to for some more detailed explanation
of this.

I also changed moduleResolution to nodenext in the tsconfig because when
it's set to node, typescript won't give errors for missing file
extensions which means they are easy to forget. With it set to nodenext,
you will get an error if an import is missing the file extension. As far
as I can see, changing this doesn't change the build output.
trygveaa added a commit to trygveaa/glTF-Transform that referenced this pull request Feb 21, 2023
When importing this library in a project using moduleResolution
nodenext, the types would give errors because the import paths were
missing the file extension which is required for moduleResolution
nodenext. Therefore we have to add .js to all imports of local files.

See developit/microbundle#1019 (comment)
and the issues that comment links to for some more detailed explanation
of this.

I also changed moduleResolution to nodenext in the tsconfig because when
it's set to node, typescript won't give errors for missing file
extensions which means they are easy to forget. With it set to nodenext,
you will get an error if an import is missing the file extension. As far
as I can see, changing this doesn't change the build output.

Depends on donmccurdy/property-graph#70 and
donmccurdy/KTX-Parse#55

Fixes donmccurdy#824
trygveaa added a commit to trygveaa/glTF-Transform that referenced this pull request Feb 21, 2023
When importing this library in a project using moduleResolution
nodenext, the types would give errors because the import paths were
missing the file extension which is required for moduleResolution
nodenext. Therefore we have to add .js to all imports of local files.

See developit/microbundle#1019 (comment)
and the issues that comment links to for some more detailed explanation
of this.

I also changed moduleResolution to nodenext in the tsconfig because when
it's set to node, typescript won't give errors for missing file
extensions which means they are easy to forget. With it set to nodenext,
you will get an error if an import is missing the file extension. As far
as I can see, changing this doesn't change the build output.

Depends on donmccurdy/property-graph#70 and
donmccurdy/KTX-Parse#55

Fixes donmccurdy#824
trygveaa added a commit to trygveaa/glTF-Transform that referenced this pull request Feb 21, 2023
When importing this library in a project using moduleResolution
nodenext, the types would give errors because the import paths were
missing the file extension which is required for moduleResolution
nodenext. Therefore we have to add .js to all imports of local files.

See developit/microbundle#1019 (comment)
and the issues that comment links to for some more detailed explanation
of this.

I also changed moduleResolution to nodenext in the tsconfig because when
it's set to node, typescript won't give errors for missing file
extensions which means they are easy to forget. With it set to nodenext,
you will get an error if an import is missing the file extension. As far
as I can see, changing this doesn't change the build output.

Depends on donmccurdy/property-graph#70 and
donmccurdy/KTX-Parse#55

Fixes donmccurdy#824
@donmccurdy donmccurdy merged commit 8a6eab6 into donmccurdy:main Feb 22, 2023
trygveaa added a commit to trygveaa/glTF-Transform that referenced this pull request Feb 22, 2023
When importing this library in a project using moduleResolution
nodenext, the types would give errors because the import paths were
missing the file extension which is required for moduleResolution
nodenext. Therefore we have to add .js to all imports of local files.

See developit/microbundle#1019 (comment)
and the issues that comment links to for some more detailed explanation
of this.

I also changed moduleResolution to nodenext in the tsconfig because when
it's set to node, typescript won't give errors for missing file
extensions which means they are easy to forget. With it set to nodenext,
you will get an error if an import is missing the file extension. As far
as I can see, changing this doesn't change the build output.

Depends on donmccurdy/property-graph#70 and
donmccurdy/KTX-Parse#55

Fixes donmccurdy#824
@trygveaa trygveaa deleted the fix-type-definitions-for-nodenext branch February 22, 2023 09:19
donmccurdy pushed a commit to donmccurdy/glTF-Transform that referenced this pull request Feb 22, 2023
When importing this library in a project using moduleResolution
nodenext, the types would give errors because the import paths were
missing the file extension which is required for moduleResolution
nodenext. Therefore we have to add .js to all imports of local files.

See developit/microbundle#1019 (comment)
and the issues that comment links to for some more detailed explanation
of this.

I also changed moduleResolution to nodenext in the tsconfig because when
it's set to node, typescript won't give errors for missing file
extensions which means they are easy to forget. With it set to nodenext,
you will get an error if an import is missing the file extension. As far
as I can see, changing this doesn't change the build output.

Depends on donmccurdy/property-graph#70 and
donmccurdy/KTX-Parse#55

Fixes #824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants