@vanilla-extract/vite-plugin 4.0.5 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,8 @@ function vanillaExtractPlugin({
28
28
  let resolvedId = filePath;
29
29
  if (filePath.startsWith(config.root) ||
30
30
  // In monorepos the absolute path will be outside of config.root, so we check that they have the same root on the file system
31
- path__default["default"].isAbsolute(filePath) && filePath.split(path__default["default"].sep)[1] === config.root.split(path__default["default"].sep)[1]) {
31
+ // Paths from vite are always normalized, so we have to use the posix path separator
32
+ path__default["default"].isAbsolute(filePath) && filePath.split(path__default["default"].posix.sep)[1] === config.root.split(path__default["default"].posix.sep)[1]) {
32
33
  resolvedId = filePath;
33
34
  } else {
34
35
  // In SSR mode we can have paths like /app/styles.css.ts
@@ -104,7 +105,10 @@ function vanillaExtractPlugin({
104
105
  // If it _is_ loaded with a config file, it will create an infinite loop because it
105
106
  // also has a child compiler which uses the same mechanism to load the config file.
106
107
  // https://github.com/remix-run/remix/pull/7990#issuecomment-1809356626
107
- plugin.name !== 'remix')
108
+ // Additionally, some internal Remix plugins rely on a `ctx` object to be initialized by
109
+ // the main Remix plugin, and may not function correctly without it. To address this, we
110
+ // filter out all Remix-related plugins.
111
+ !plugin.name.startsWith('remix'))
108
112
  }
109
113
  });
110
114
  }
@@ -28,7 +28,8 @@ function vanillaExtractPlugin({
28
28
  let resolvedId = filePath;
29
29
  if (filePath.startsWith(config.root) ||
30
30
  // In monorepos the absolute path will be outside of config.root, so we check that they have the same root on the file system
31
- path__default["default"].isAbsolute(filePath) && filePath.split(path__default["default"].sep)[1] === config.root.split(path__default["default"].sep)[1]) {
31
+ // Paths from vite are always normalized, so we have to use the posix path separator
32
+ path__default["default"].isAbsolute(filePath) && filePath.split(path__default["default"].posix.sep)[1] === config.root.split(path__default["default"].posix.sep)[1]) {
32
33
  resolvedId = filePath;
33
34
  } else {
34
35
  // In SSR mode we can have paths like /app/styles.css.ts
@@ -104,7 +105,10 @@ function vanillaExtractPlugin({
104
105
  // If it _is_ loaded with a config file, it will create an infinite loop because it
105
106
  // also has a child compiler which uses the same mechanism to load the config file.
106
107
  // https://github.com/remix-run/remix/pull/7990#issuecomment-1809356626
107
- plugin.name !== 'remix')
108
+ // Additionally, some internal Remix plugins rely on a `ctx` object to be initialized by
109
+ // the main Remix plugin, and may not function correctly without it. To address this, we
110
+ // filter out all Remix-related plugins.
111
+ !plugin.name.startsWith('remix'))
108
112
  }
109
113
  });
110
114
  }
@@ -20,7 +20,8 @@ function vanillaExtractPlugin({
20
20
  let resolvedId = filePath;
21
21
  if (filePath.startsWith(config.root) ||
22
22
  // In monorepos the absolute path will be outside of config.root, so we check that they have the same root on the file system
23
- path.isAbsolute(filePath) && filePath.split(path.sep)[1] === config.root.split(path.sep)[1]) {
23
+ // Paths from vite are always normalized, so we have to use the posix path separator
24
+ path.isAbsolute(filePath) && filePath.split(path.posix.sep)[1] === config.root.split(path.posix.sep)[1]) {
24
25
  resolvedId = filePath;
25
26
  } else {
26
27
  // In SSR mode we can have paths like /app/styles.css.ts
@@ -96,7 +97,10 @@ function vanillaExtractPlugin({
96
97
  // If it _is_ loaded with a config file, it will create an infinite loop because it
97
98
  // also has a child compiler which uses the same mechanism to load the config file.
98
99
  // https://github.com/remix-run/remix/pull/7990#issuecomment-1809356626
99
- plugin.name !== 'remix')
100
+ // Additionally, some internal Remix plugins rely on a `ctx` object to be initialized by
101
+ // the main Remix plugin, and may not function correctly without it. To address this, we
102
+ // filter out all Remix-related plugins.
103
+ !plugin.name.startsWith('remix'))
100
104
  }
101
105
  });
102
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanilla-extract/vite-plugin",
3
- "version": "4.0.5",
3
+ "version": "4.0.7",
4
4
  "description": "Zero-runtime Stylesheets-in-TypeScript",
5
5
  "main": "dist/vanilla-extract-vite-plugin.cjs.js",
6
6
  "module": "dist/vanilla-extract-vite-plugin.esm.js",
@@ -15,7 +15,7 @@
15
15
  "author": "SEEK",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@vanilla-extract/integration": "^7.1.0"
18
+ "@vanilla-extract/integration": "^7.1.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "vite": "^5.0.11"