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
sounds like you need https://www.npmjs.com/package/vite-tsconfig-paths
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.YES! that solve it! may thanks
ur very welcome!