@vanilla-extract/vite-plugin 4.0.20-split-out-compiler-20250129230749 → 5.0.0-update-vite-20250122230431

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.
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var path = require('path');
6
- var compiler = require('@vanilla-extract/compiler');
7
6
  var integration = require('@vanilla-extract/integration');
8
7
 
9
8
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -36,7 +35,7 @@ function vanillaExtractPlugin({
36
35
  let configEnv;
37
36
  let server;
38
37
  let packageName;
39
- let compiler$1;
38
+ let compiler;
40
39
  const vitePromise = import('vite');
41
40
  const getIdentOption = () => identifiers ?? (config.mode === 'production' ? 'short' : 'debug');
42
41
  const getAbsoluteId = filePath => {
@@ -86,7 +85,7 @@ function vanillaExtractPlugin({
86
85
  },
87
86
  async buildStart() {
88
87
  // Ensure we re-use the compiler instance between builds, e.g. in watch mode
89
- if (mode !== 'transform' && !compiler$1) {
88
+ if (mode !== 'transform' && !compiler) {
90
89
  var _configForViteCompile;
91
90
  const {
92
91
  loadConfigFromFile
@@ -110,7 +109,7 @@ function vanillaExtractPlugin({
110
109
  ...configForViteCompiler,
111
110
  plugins: (_configForViteCompile = configForViteCompiler) === null || _configForViteCompile === void 0 || (_configForViteCompile = _configForViteCompile.plugins) === null || _configForViteCompile === void 0 ? void 0 : _configForViteCompile.flat().filter(removeIncompatiblePlugins)
112
111
  };
113
- compiler$1 = compiler.createCompiler({
112
+ compiler = integration.createCompiler({
114
113
  root: config.root,
115
114
  identifiers: getIdentOption(),
116
115
  cssImportSpecifier: fileIdToVirtualId,
@@ -123,12 +122,12 @@ function vanillaExtractPlugin({
123
122
  // Instead, we close it when the watcher is closed via the closeWatcher hook.
124
123
  if (!config.build.watch) {
125
124
  var _compiler;
126
- (_compiler = compiler$1) === null || _compiler === void 0 || _compiler.close();
125
+ (_compiler = compiler) === null || _compiler === void 0 || _compiler.close();
127
126
  }
128
127
  },
129
128
  closeWatcher() {
130
129
  var _compiler2;
131
- return (_compiler2 = compiler$1) === null || _compiler2 === void 0 ? void 0 : _compiler2.close();
130
+ return (_compiler2 = compiler) === null || _compiler2 === void 0 ? void 0 : _compiler2.close();
132
131
  },
133
132
  async transform(code, id) {
134
133
  const [validId] = id.split('?');
@@ -145,12 +144,12 @@ function vanillaExtractPlugin({
145
144
  identOption
146
145
  });
147
146
  }
148
- if (compiler$1) {
147
+ if (compiler) {
149
148
  const absoluteId = getAbsoluteId(validId);
150
149
  const {
151
150
  source,
152
151
  watchFiles
153
- } = await compiler$1.processVanillaFile(absoluteId, {
152
+ } = await compiler.processVanillaFile(absoluteId, {
154
153
  outputCss: true
155
154
  });
156
155
  const result = {
@@ -187,18 +186,18 @@ function vanillaExtractPlugin({
187
186
  if ( // We should always have CSS for a file here.
188
187
  // The only valid scenario for a missing one is if someone had written
189
188
  // a file in their app using the .vanilla.js/.vanilla.css extension
190
- (_compiler3 = compiler$1) !== null && _compiler3 !== void 0 && _compiler3.getCssForFile(virtualIdToFileId(absoluteId))) {
189
+ (_compiler3 = compiler) !== null && _compiler3 !== void 0 && _compiler3.getCssForFile(virtualIdToFileId(absoluteId))) {
191
190
  // Keep the original query string for HMR.
192
191
  return absoluteId + (query ? `?${query}` : '');
193
192
  }
194
193
  },
195
194
  load(id) {
196
195
  const [validId] = id.split('?');
197
- if (!isVirtualId(validId) || !compiler$1) return;
196
+ if (!isVirtualId(validId) || !compiler) return;
198
197
  const absoluteId = getAbsoluteId(validId);
199
198
  const {
200
199
  css
201
- } = compiler$1.getCssForFile(virtualIdToFileId(absoluteId));
200
+ } = compiler.getCssForFile(virtualIdToFileId(absoluteId));
202
201
  return css;
203
202
  }
204
203
  };
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var path = require('path');
6
- var compiler = require('@vanilla-extract/compiler');
7
6
  var integration = require('@vanilla-extract/integration');
8
7
 
9
8
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -36,7 +35,7 @@ function vanillaExtractPlugin({
36
35
  let configEnv;
37
36
  let server;
38
37
  let packageName;
39
- let compiler$1;
38
+ let compiler;
40
39
  const vitePromise = import('vite');
41
40
  const getIdentOption = () => identifiers ?? (config.mode === 'production' ? 'short' : 'debug');
42
41
  const getAbsoluteId = filePath => {
@@ -86,7 +85,7 @@ function vanillaExtractPlugin({
86
85
  },
87
86
  async buildStart() {
88
87
  // Ensure we re-use the compiler instance between builds, e.g. in watch mode
89
- if (mode !== 'transform' && !compiler$1) {
88
+ if (mode !== 'transform' && !compiler) {
90
89
  var _configForViteCompile;
91
90
  const {
92
91
  loadConfigFromFile
@@ -110,7 +109,7 @@ function vanillaExtractPlugin({
110
109
  ...configForViteCompiler,
111
110
  plugins: (_configForViteCompile = configForViteCompiler) === null || _configForViteCompile === void 0 || (_configForViteCompile = _configForViteCompile.plugins) === null || _configForViteCompile === void 0 ? void 0 : _configForViteCompile.flat().filter(removeIncompatiblePlugins)
112
111
  };
113
- compiler$1 = compiler.createCompiler({
112
+ compiler = integration.createCompiler({
114
113
  root: config.root,
115
114
  identifiers: getIdentOption(),
116
115
  cssImportSpecifier: fileIdToVirtualId,
@@ -123,12 +122,12 @@ function vanillaExtractPlugin({
123
122
  // Instead, we close it when the watcher is closed via the closeWatcher hook.
124
123
  if (!config.build.watch) {
125
124
  var _compiler;
126
- (_compiler = compiler$1) === null || _compiler === void 0 || _compiler.close();
125
+ (_compiler = compiler) === null || _compiler === void 0 || _compiler.close();
127
126
  }
128
127
  },
129
128
  closeWatcher() {
130
129
  var _compiler2;
131
- return (_compiler2 = compiler$1) === null || _compiler2 === void 0 ? void 0 : _compiler2.close();
130
+ return (_compiler2 = compiler) === null || _compiler2 === void 0 ? void 0 : _compiler2.close();
132
131
  },
133
132
  async transform(code, id) {
134
133
  const [validId] = id.split('?');
@@ -145,12 +144,12 @@ function vanillaExtractPlugin({
145
144
  identOption
146
145
  });
147
146
  }
148
- if (compiler$1) {
147
+ if (compiler) {
149
148
  const absoluteId = getAbsoluteId(validId);
150
149
  const {
151
150
  source,
152
151
  watchFiles
153
- } = await compiler$1.processVanillaFile(absoluteId, {
152
+ } = await compiler.processVanillaFile(absoluteId, {
154
153
  outputCss: true
155
154
  });
156
155
  const result = {
@@ -187,18 +186,18 @@ function vanillaExtractPlugin({
187
186
  if ( // We should always have CSS for a file here.
188
187
  // The only valid scenario for a missing one is if someone had written
189
188
  // a file in their app using the .vanilla.js/.vanilla.css extension
190
- (_compiler3 = compiler$1) !== null && _compiler3 !== void 0 && _compiler3.getCssForFile(virtualIdToFileId(absoluteId))) {
189
+ (_compiler3 = compiler) !== null && _compiler3 !== void 0 && _compiler3.getCssForFile(virtualIdToFileId(absoluteId))) {
191
190
  // Keep the original query string for HMR.
192
191
  return absoluteId + (query ? `?${query}` : '');
193
192
  }
194
193
  },
195
194
  load(id) {
196
195
  const [validId] = id.split('?');
197
- if (!isVirtualId(validId) || !compiler$1) return;
196
+ if (!isVirtualId(validId) || !compiler) return;
198
197
  const absoluteId = getAbsoluteId(validId);
199
198
  const {
200
199
  css
201
- } = compiler$1.getCssForFile(virtualIdToFileId(absoluteId));
200
+ } = compiler.getCssForFile(virtualIdToFileId(absoluteId));
202
201
  return css;
203
202
  }
204
203
  };
@@ -1,6 +1,5 @@
1
1
  import path from 'path';
2
- import { createCompiler } from '@vanilla-extract/compiler';
3
- import { getPackageInfo, cssFileFilter, transform, normalizePath } from '@vanilla-extract/integration';
2
+ import { getPackageInfo, createCompiler, cssFileFilter, transform, normalizePath } from '@vanilla-extract/integration';
4
3
 
5
4
  const virtualExtCss = '.vanilla.css';
6
5
  const isVirtualId = id => id.endsWith(virtualExtCss);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanilla-extract/vite-plugin",
3
- "version": "4.0.20-split-out-compiler-20250129230749",
3
+ "version": "5.0.0-update-vite-20250122230431",
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",
@@ -16,13 +16,12 @@
16
16
  "author": "SEEK",
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
- "@vanilla-extract/compiler": "^0.1.0-split-out-compiler-20250129230749",
20
- "@vanilla-extract/integration": "^8.0.0-split-out-compiler-20250129230749"
19
+ "@vanilla-extract/integration": "^7.1.13-update-vite-20250122230431"
21
20
  },
22
21
  "devDependencies": {
23
- "vite": "^5.0.11"
22
+ "vite": "^6.0.10"
24
23
  },
25
24
  "peerDependencies": {
26
- "vite": "^4.0.3 || ^5.0.0"
25
+ "vite": "^5.0.0 || ^6.0.0"
27
26
  }
28
27
  }