@plumeria/unplugin 19.5.0 → 19.5.1

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.
package/dist/core.js CHANGED
@@ -119,7 +119,7 @@ const unpluginFactory = (options = {}, unpluginMeta) => {
119
119
  this.addWatchFile(depPath);
120
120
  }
121
121
  };
122
- const { code: transformedSource, sheets: extractedSheets } = await transformSource({
122
+ const { code: transformedSource, sheets: extractedSheets } = transformSource({
123
123
  source,
124
124
  moduleId: id,
125
125
  filePath: baseId,
@@ -131,7 +131,6 @@ const unpluginFactory = (options = {}, unpluginMeta) => {
131
131
  collectOndemandSheets: true,
132
132
  addDependency,
133
133
  });
134
- const optInCSS = await optimizer(extractedSheets.join(''));
135
134
  const cssFilename = `${baseId.replace(exports.EXTENSION_PATTERN, '')}.zero.css`;
136
135
  const cssId = `/${path.relative(viteRoot, cssFilename).replace(/\\/g, '/')}`;
137
136
  if (isDev) {
@@ -143,11 +142,11 @@ const unpluginFactory = (options = {}, unpluginMeta) => {
143
142
  acc.delete(sheet);
144
143
  acc.add(sheet);
145
144
  });
146
- const accCSS = await optimizer(Array.from(acc).join(''));
145
+ const accCSS = optimizer(Array.from(acc).join(''));
147
146
  cssLookup.set(cssFilename, accCSS);
148
147
  }
149
148
  else {
150
- cssLookup.set(cssFilename, optInCSS);
149
+ cssLookup.set(cssFilename, optimizer(extractedSheets.join('')));
151
150
  }
152
151
  cssFileLookup.set(cssId, cssFilename);
153
152
  if (extractedSheets.length > 0) {
package/dist/core.mjs CHANGED
@@ -80,7 +80,7 @@ export const unpluginFactory = (options = {}, unpluginMeta) => {
80
80
  this.addWatchFile(depPath);
81
81
  }
82
82
  };
83
- const { code: transformedSource, sheets: extractedSheets } = await transformSource({
83
+ const { code: transformedSource, sheets: extractedSheets } = transformSource({
84
84
  source,
85
85
  moduleId: id,
86
86
  filePath: baseId,
@@ -92,7 +92,6 @@ export const unpluginFactory = (options = {}, unpluginMeta) => {
92
92
  collectOndemandSheets: true,
93
93
  addDependency,
94
94
  });
95
- const optInCSS = await optimizer(extractedSheets.join(''));
96
95
  const cssFilename = `${baseId.replace(EXTENSION_PATTERN, '')}.zero.css`;
97
96
  const cssId = `/${path.relative(viteRoot, cssFilename).replace(/\\/g, '/')}`;
98
97
  if (isDev) {
@@ -104,11 +103,11 @@ export const unpluginFactory = (options = {}, unpluginMeta) => {
104
103
  acc.delete(sheet);
105
104
  acc.add(sheet);
106
105
  });
107
- const accCSS = await optimizer(Array.from(acc).join(''));
106
+ const accCSS = optimizer(Array.from(acc).join(''));
108
107
  cssLookup.set(cssFilename, accCSS);
109
108
  }
110
109
  else {
111
- cssLookup.set(cssFilename, optInCSS);
110
+ cssLookup.set(cssFilename, optimizer(extractedSheets.join('')));
112
111
  }
113
112
  cssFileLookup.set(cssId, cssFilename);
114
113
  if (extractedSheets.length > 0) {
package/dist/vite.js CHANGED
@@ -194,7 +194,7 @@ function attachViteHooks(plugin, options) {
194
194
  return;
195
195
  if (this.environment?.name !== 'rsc')
196
196
  return;
197
- const source = await optimizer([...cssLookup.keys()]
197
+ const source = optimizer([...cssLookup.keys()]
198
198
  .sort()
199
199
  .map((key) => cssLookup.get(key))
200
200
  .join(''));
package/dist/vite.mjs CHANGED
@@ -156,7 +156,7 @@ function attachViteHooks(plugin, options) {
156
156
  return;
157
157
  if (this.environment?.name !== 'rsc')
158
158
  return;
159
- const source = await optimizer([...cssLookup.keys()]
159
+ const source = optimizer([...cssLookup.keys()]
160
160
  .sort()
161
161
  .map((key) => cssLookup.get(key))
162
162
  .join(''));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/unplugin",
3
- "version": "19.5.0",
3
+ "version": "19.5.1",
4
4
  "description": "Universal Plumeria plugin for various build tools",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",
@@ -94,7 +94,7 @@
94
94
  "dependencies": {
95
95
  "@rollup/pluginutils": "^5.4.0",
96
96
  "unplugin": "^3.0.0",
97
- "@plumeria/compiler": "19.5.0"
97
+ "@plumeria/compiler": "19.5.1"
98
98
  },
99
99
  "devDependencies": {
100
100
  "vite": "^8.0.13"