@vanilla-extract/vite-plugin 5.1.0-vite-ssr-20250603032431 → 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' | 'inlineCriticalCssInSsrDev';
16
+ unstable_mode?: 'transform' | 'emitCss' | 'inlineCssInDev';
17
17
  }
18
18
  declare function vanillaExtractPlugin({ identifiers, unstable_pluginFilter: pluginFilter, unstable_mode, }?: Options): Plugin[];
19
19
 
@@ -71,16 +71,22 @@ function vanillaExtractPlugin({
71
71
  }
72
72
  }
73
73
  return [{
74
- name: `${PLUGIN_NAMESPACE}-inline-critical-css-in-ssr-dev`,
75
- apply: (_config, {
74
+ name: `${PLUGIN_NAMESPACE}-inline-dev-css`,
75
+ apply: (_, {
76
76
  command
77
- }) => command === 'serve' && unstable_mode === 'inlineCriticalCssInSsrDev',
78
- transformIndexHtml: _html => {
77
+ }) => command === 'serve' && unstable_mode === 'inlineCssInDev',
78
+ transformIndexHtml: async () => {
79
79
  var _compiler;
80
80
  const allCss = (_compiler = compiler$1) === null || _compiler === void 0 ? void 0 : _compiler.getAllCss();
81
+ if (!allCss) {
82
+ return [];
83
+ }
81
84
  return [{
82
85
  tag: 'style',
83
86
  children: allCss,
87
+ attrs: {
88
+ type: 'text/css'
89
+ },
84
90
  injectTo: 'head-prepend'
85
91
  }];
86
92
  }
@@ -71,16 +71,22 @@ function vanillaExtractPlugin({
71
71
  }
72
72
  }
73
73
  return [{
74
- name: `${PLUGIN_NAMESPACE}-inline-critical-css-in-ssr-dev`,
75
- apply: (_config, {
74
+ name: `${PLUGIN_NAMESPACE}-inline-dev-css`,
75
+ apply: (_, {
76
76
  command
77
- }) => command === 'serve' && unstable_mode === 'inlineCriticalCssInSsrDev',
78
- transformIndexHtml: _html => {
77
+ }) => command === 'serve' && unstable_mode === 'inlineCssInDev',
78
+ transformIndexHtml: async () => {
79
79
  var _compiler;
80
80
  const allCss = (_compiler = compiler$1) === null || _compiler === void 0 ? void 0 : _compiler.getAllCss();
81
+ if (!allCss) {
82
+ return [];
83
+ }
81
84
  return [{
82
85
  tag: 'style',
83
86
  children: allCss,
87
+ attrs: {
88
+ type: 'text/css'
89
+ },
84
90
  injectTo: 'head-prepend'
85
91
  }];
86
92
  }
@@ -63,16 +63,22 @@ function vanillaExtractPlugin({
63
63
  }
64
64
  }
65
65
  return [{
66
- name: `${PLUGIN_NAMESPACE}-inline-critical-css-in-ssr-dev`,
67
- apply: (_config, {
66
+ name: `${PLUGIN_NAMESPACE}-inline-dev-css`,
67
+ apply: (_, {
68
68
  command
69
- }) => command === 'serve' && unstable_mode === 'inlineCriticalCssInSsrDev',
70
- transformIndexHtml: _html => {
69
+ }) => command === 'serve' && unstable_mode === 'inlineCssInDev',
70
+ transformIndexHtml: async () => {
71
71
  var _compiler;
72
72
  const allCss = (_compiler = compiler) === null || _compiler === void 0 ? void 0 : _compiler.getAllCss();
73
+ if (!allCss) {
74
+ return [];
75
+ }
73
76
  return [{
74
77
  tag: 'style',
75
78
  children: allCss,
79
+ attrs: {
80
+ type: 'text/css'
81
+ },
76
82
  injectTo: 'head-prepend'
77
83
  }];
78
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanilla-extract/vite-plugin",
3
- "version": "5.1.0-vite-ssr-20250603032431",
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",
@@ -16,8 +16,8 @@
16
16
  "author": "SEEK",
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
- "@vanilla-extract/compiler": "^0.3.0-vite-ssr-20250603032431",
20
- "@vanilla-extract/integration": "^8.0.2"
19
+ "@vanilla-extract/compiler": "^0.3.0-vite-inline-dev-css-20250617003237",
20
+ "@vanilla-extract/integration": "^8.0.4"
21
21
  },
22
22
  "devDependencies": {
23
23
  "vite": "^5.0.0 || ^6.0.0"