We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.css.ts
1 parent ebd6988 commit 8c2ac42Copy full SHA for 8c2ac42
.changeset/eight-peas-provide.md
@@ -0,0 +1,5 @@
1
+---
2
+'@vanilla-extract/vite-plugin': patch
3
4
+
5
+Fix `.css.ts` file resolution on Windows
packages/vite-plugin/src/index.ts
@@ -47,8 +47,10 @@ export function vanillaExtractPlugin({
47
if (
48
filePath.startsWith(config.root) ||
49
// In monorepos the absolute path will be outside of config.root, so we check that they have the same root on the file system
50
+ // Paths from vite are always normalized, so we have to use the posix path separator
51
(path.isAbsolute(filePath) &&
- filePath.split(path.sep)[1] === config.root.split(path.sep)[1])
52
+ filePath.split(path.posix.sep)[1] ===
53
+ config.root.split(path.posix.sep)[1])
54
) {
55
resolvedId = filePath;
56
} else {
0 commit comments