In our project, we are using node to resolve paths, and not a bundler. This means that our imports must all end in .js:
import { BlockquoteIcon } from '#/components/tiptap-icons/blockquote-icon';
import { useTiptapEditor } from '#/hooks/use-tiptap-editor';
needs to be:
import { BlockquoteIcon } from '#/components/tiptap-icons/blockquote-icon.js';
import { useTiptapEditor } from '#/hooks/use-tiptap-editor.js';
We use this field in our package.json:
"imports": {
"#/*": [
"./src/*"
]
},
I would suggest that there is some option to indicate that files should end in .js, potentially by first checking imports in package.json before looking at paths in tsconfig.json.
In our project, we are using node to resolve paths, and not a bundler. This means that our imports must all end in
.js:needs to be:
We use this field in our
package.json:I would suggest that there is some option to indicate that files should end in
.js, potentially by first checkingimportsinpackage.jsonbefore looking atpathsintsconfig.json.