@vanilla-extract/vite-plugin 5.1.0-vite-ssr-20250611005022 → 5.1.0-vite-inline-dev-css-20250617003237

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.
@@ -13,7 +13,7 @@ type PluginFilter = (filterProps: {
13
13
  interface Options {
14
14
  identifiers?: IdentifierOption;
15
15
  unstable_pluginFilter?: PluginFilter;
16
- unstable_mode?: 'transform' | 'emitCss' | 'inlineCssInSsrDev';
16
+ unstable_mode?: 'transform' | 'emitCss' | 'inlineCssInDev';
17
17
  }
18
18
  declare function vanillaExtractPlugin({ identifiers, unstable_pluginFilter: pluginFilter, unstable_mode, }?: Options): Plugin[];
19
19
 
@@ -71,21 +71,16 @@ function vanillaExtractPlugin({
71
71
  }
72
72
  }
73
73
  return [{
74
- name: `${PLUGIN_NAMESPACE}-inline-css-in-ssr-dev`,
75
- apply: (config, {
74
+ name: `${PLUGIN_NAMESPACE}-inline-dev-css`,
75
+ apply: (_, {
76
76
  command
77
- }) => {
78
- var _config$build;
79
- console.log({
80
- command,
81
- c: config.build
82
- });
83
- return command === 'serve' && Boolean((_config$build = config.build) === null || _config$build === void 0 ? void 0 : _config$build.ssr) && unstable_mode === 'inlineCssInSsrDev';
84
- },
77
+ }) => command === 'serve' && unstable_mode === 'inlineCssInDev',
85
78
  transformIndexHtml: async () => {
86
79
  var _compiler;
87
80
  const allCss = (_compiler = compiler$1) === null || _compiler === void 0 ? void 0 : _compiler.getAllCss();
88
- console.log('doing the thing');
81
+ if (!allCss) {
82
+ return [];
83
+ }
89
84
  return [{
90
85
  tag: 'style',
91
86
  children: allCss,
@@ -71,21 +71,16 @@ function vanillaExtractPlugin({
71
71
  }
72
72
  }
73
73
  return [{
74
- name: `${PLUGIN_NAMESPACE}-inline-css-in-ssr-dev`,
75
- apply: (config, {
74
+ name: `${PLUGIN_NAMESPACE}-inline-dev-css`,
75
+ apply: (_, {
76
76
  command
77
- }) => {
78
- var _config$build;
79
- console.log({
80
- command,
81
- c: config.build
82
- });
83
- return command === 'serve' && Boolean((_config$build = config.build) === null || _config$build === void 0 ? void 0 : _config$build.ssr) && unstable_mode === 'inlineCssInSsrDev';
84
- },
77
+ }) => command === 'serve' && unstable_mode === 'inlineCssInDev',
85
78
  transformIndexHtml: async () => {
86
79
  var _compiler;
87
80
  const allCss = (_compiler = compiler$1) === null || _compiler === void 0 ? void 0 : _compiler.getAllCss();
88
- console.log('doing the thing');
81
+ if (!allCss) {
82
+ return [];
83
+ }
89
84
  return [{
90
85
  tag: 'style',
91
86
  children: allCss,
@@ -63,21 +63,16 @@ function vanillaExtractPlugin({
63
63
  }
64
64
  }
65
65
  return [{
66
- name: `${PLUGIN_NAMESPACE}-inline-css-in-ssr-dev`,
67
- apply: (config, {
66
+ name: `${PLUGIN_NAMESPACE}-inline-dev-css`,
67
+ apply: (_, {
68
68
  command
69
- }) => {
70
- var _config$build;
71
- console.log({
72
- command,
73
- c: config.build
74
- });
75
- return command === 'serve' && Boolean((_config$build = config.build) === null || _config$build === void 0 ? void 0 : _config$build.ssr) && unstable_mode === 'inlineCssInSsrDev';
76
- },
69
+ }) => command === 'serve' && unstable_mode === 'inlineCssInDev',
77
70
  transformIndexHtml: async () => {
78
71
  var _compiler;
79
72
  const allCss = (_compiler = compiler) === null || _compiler === void 0 ? void 0 : _compiler.getAllCss();
80
- console.log('doing the thing');
73
+ if (!allCss) {
74
+ return [];
75
+ }
81
76
  return [{
82
77
  tag: 'style',
83
78
  children: allCss,
package/package.json CHANGED
@@ -1,18 +1,10 @@
1
1
  {
2
2
  "name": "@vanilla-extract/vite-plugin",
3
- "version": "5.1.0-vite-ssr-20250611005022",
3
+ "version": "5.1.0-vite-inline-dev-css-20250617003237",
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",
7
7
  "types": "dist/vanilla-extract-vite-plugin.cjs.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/vanilla-extract-vite-plugin.cjs.d.ts",
11
- "import": "./dist/vanilla-extract-vite-plugin.esm.js",
12
- "default": "./dist/vanilla-extract-vite-plugin.cjs.js"
13
- },
14
- "./package.json": "./package.json"
15
- },
16
8
  "files": [
17
9
  "/dist"
18
10
  ],
@@ -24,8 +16,8 @@
24
16
  "author": "SEEK",
25
17
  "license": "MIT",
26
18
  "dependencies": {
27
- "@vanilla-extract/compiler": "^0.3.0-vite-ssr-20250611005022",
28
- "@vanilla-extract/integration": "^8.0.3"
19
+ "@vanilla-extract/compiler": "^0.3.0-vite-inline-dev-css-20250617003237",
20
+ "@vanilla-extract/integration": "^8.0.4"
29
21
  },
30
22
  "devDependencies": {
31
23
  "vite": "^5.0.0 || ^6.0.0"