You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm using @nanostores/query in a TypeScript project with the "module": "nodenext" in tsconfig.json configuration.
However, I encountered an issue where some imports inside @nanostores/query are not working correctly with "module": "nodenext". Specifically, imports in "type files" (.d.ts) like import('./factory') are missing explicit extensions (.d.ts). This translates into the fact that all types from createFetcherStore become any.
Alternatively, if I switch to "module": "esnext" with "moduleResolution": "bundler", the imports work without needing explicit extensions, but then i lose "nodenext" mode.
Steps to Reproduce
Set up a TypeScript project with the following tsconfig.json:
Hi. I'm using
@nanostores/query
in a TypeScript project with the"module": "nodenext"
intsconfig.json
configuration.However, I encountered an issue where some imports inside
@nanostores/query
are not working correctly with"module": "nodenext"
. Specifically, imports in "type files" (.d.ts) likeimport('./factory')
are missing explicit extensions (.d.ts
). This translates into the fact that all types fromcreateFetcherStore
becomeany
.Alternatively, if I switch to
"module": "esnext"
with"moduleResolution": "bundler"
, the imports work without needing explicit extensions, but then i lose"nodenext"
mode.Steps to Reproduce
tsconfig.json
:Install
nanostores
&@nanostores/query
and try to use it in the project.Try to create nanoquery store
or check this stackblitz example
Expected Behavior
The imports should work correctly with
"module": "nodenext"
.Suggested Fix
To ensure compatibility with
"module": "nodenext"
, it would be helpful to add explicit extensions to the imports in@nanostores/query
, such as:Environment
@nanostores/query
version: [0.3.4]The text was updated successfully, but these errors were encountered: