Skip to content

Support for node resolver #27

@reteps

Description

@reteps

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions