failed to resolve import

Hey, i'm facing something very strange, i install my pandacss and modify the tsconfig.json to add an "alias" so i can type @panda/css ... and use the functions but i receive the error Failed to resolve import ....Does the file exist? "paths": { "~/": ["./src/"], "@/": ["./drizzle/"], "@panda/": ["./styled-system/"] } this is the tsconfig path i added import { css } from "@panda/css"; i import this way. inside my component. The cursor ide don't complain but the HMR don't detect the import. Some idea about what can be happening?
3 Replies
bigmistqke
bigmistqke5w ago
npm
vite-tsconfig-paths
Vite resolver for TypeScript compilerOptions.paths. Latest version: 5.1.4, last published: 2 months ago. Start using vite-tsconfig-paths in your project by running npm i vite-tsconfig-paths. There are 698 other projects in the npm registry using vite-tsconfig-paths.
WhyTerremotin!
WhyTerremotin!OP5w ago
YES! that solve it! may thanks
bigmistqke
bigmistqke5w ago
ur very welcome!

Did you find this page helpful?