Closed basaran closed 2 weeks ago
Hello,
I'm not sure if this is a limitation by Vite, but given that I have this config:
css: { devSourcemap: true, preprocessorOptions: { css: {}, scss: { additionalData: [ '@import "@/scss/_vars.scss";', ].join("\n"), //f }, }, },
and I have this in my tsconfig.json:
"paths": { "@/*": ["./src/*"], } //a
Vite complains that it can not locate the file. Defining the alias inside Vite resolve.alias works of course.
resolve.alias
resolve: { alias: { "@": path.resolve(__dirname, "src"), }, },
Likely related to #30
Indeed it is, and the PR on upstream should fix it when it is merged as you have noted. Thank you for the insights. Closing.
Hello,
I'm not sure if this is a limitation by Vite, but given that I have this config:
and I have this in my tsconfig.json:
Vite complains that it can not locate the file. Defining the alias inside Vite
resolve.alias
works of course.