Skip to content

Not able to import from the "classnames" package #42

Answered by fwouts
gnapse asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @gnapse, long-time power user of Todoist here, so thank you for your work :)

I think I found the issue. The following TypeScript alias is confusing React Preview (more specifically vite-tsconfig-paths, which is used under the hood):

        "paths": {
            "@": ["./"],
            "*": ["src/*", "node_modules/*"]  // this line is the issue (specifically the node_modules alias)
        },

The codebase seems to compile fine without it, so maybe you could simply remove it?

Note: You may need to reload your IDE to force React Preview to restart (I'll make sure it restarts automatically when tsconfig.json is updated in the future).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gnapse
Comment options

Answer selected by gnapse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants