vite 8.1.3 → 8.1.4
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/client/client.mjs +4 -4
- package/dist/node/chunks/build.js +156 -80
- package/dist/node/chunks/lib.js +1 -1
- package/dist/node/chunks/node.js +466 -76
- package/dist/node/chunks/postcss-import.js +1 -1
- package/dist/node/cli.js +3 -4
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +1 -2
- package/package.json +6 -6
- package/dist/node/chunks/logger.js +0 -364
package/dist/client/client.mjs
CHANGED
|
@@ -8,7 +8,7 @@ let nanoid = (size = 21) => {
|
|
|
8
8
|
return id;
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
11
|
-
//#region \0@oxc-project+runtime@0.
|
|
11
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/typeof.js
|
|
12
12
|
function _typeof(o) {
|
|
13
13
|
"@babel/helpers - typeof";
|
|
14
14
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -18,7 +18,7 @@ function _typeof(o) {
|
|
|
18
18
|
}, _typeof(o);
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
|
-
//#region \0@oxc-project+runtime@0.
|
|
21
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/toPrimitive.js
|
|
22
22
|
function toPrimitive(t, r) {
|
|
23
23
|
if ("object" != _typeof(t) || !t) return t;
|
|
24
24
|
var e = t[Symbol.toPrimitive];
|
|
@@ -30,13 +30,13 @@ function toPrimitive(t, r) {
|
|
|
30
30
|
return ("string" === r ? String : Number)(t);
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
|
-
//#region \0@oxc-project+runtime@0.
|
|
33
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/toPropertyKey.js
|
|
34
34
|
function toPropertyKey(t) {
|
|
35
35
|
var i = toPrimitive(t, "string");
|
|
36
36
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region \0@oxc-project+runtime@0.
|
|
39
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/defineProperty.js
|
|
40
40
|
function _defineProperty(e, r, t) {
|
|
41
41
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
42
42
|
value: t,
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ft as __commonJSMin, pt as __require } from "./node.js";
|
|
2
2
|
import { t as require_lib } from "./lib.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
3
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/fs.js
|
|
4
4
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
get getFileSystem() {
|
|
14
|
+
return getFileSystem;
|
|
15
|
+
},
|
|
16
|
+
get setFileSystem() {
|
|
17
|
+
return setFileSystem;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
8
20
|
let fileSystem = {
|
|
9
21
|
readFile: () => {
|
|
10
22
|
throw Error("readFile not implemented");
|
|
@@ -22,10 +34,15 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22
34
|
}
|
|
23
35
|
}));
|
|
24
36
|
//#endregion
|
|
25
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
37
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/unquote.js
|
|
26
38
|
var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
27
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports
|
|
40
|
+
Object.defineProperty(exports, "default", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function() {
|
|
43
|
+
return unquote;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
29
46
|
const reg = /['"]/;
|
|
30
47
|
function unquote(str) {
|
|
31
48
|
if (!str) return "";
|
|
@@ -142,10 +159,10 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
142
159
|
return rule;
|
|
143
160
|
});
|
|
144
161
|
};
|
|
145
|
-
const createExports = (exports$
|
|
146
|
-
const declarations = Object.keys(exports$
|
|
162
|
+
const createExports = (exports$6, postcss, mode = "rule") => {
|
|
163
|
+
const declarations = Object.keys(exports$6).map((key) => postcss.decl({
|
|
147
164
|
prop: key,
|
|
148
|
-
value: exports$
|
|
165
|
+
value: exports$6[key],
|
|
149
166
|
raws: { before: "\n " }
|
|
150
167
|
}));
|
|
151
168
|
if (declarations.length === 0) return [];
|
|
@@ -159,7 +176,7 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
159
176
|
rule.append(declarations);
|
|
160
177
|
return [rule];
|
|
161
178
|
};
|
|
162
|
-
const createICSSRules = (imports, exports$
|
|
179
|
+
const createICSSRules = (imports, exports$7, postcss, mode) => [...createImports(imports, postcss, mode), ...createExports(exports$7, postcss, mode)];
|
|
163
180
|
module.exports = createICSSRules;
|
|
164
181
|
}));
|
|
165
182
|
//#endregion
|
|
@@ -173,11 +190,16 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
173
190
|
};
|
|
174
191
|
}));
|
|
175
192
|
//#endregion
|
|
176
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
193
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/Parser.js
|
|
177
194
|
var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
178
195
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
179
|
-
exports
|
|
180
|
-
|
|
196
|
+
Object.defineProperty(exports, "default", {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
get: function() {
|
|
199
|
+
return Parser;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
const _icssutils = require_src$4();
|
|
181
203
|
const importRegexp = /^:import\((.+)\)$/;
|
|
182
204
|
var Parser = class {
|
|
183
205
|
constructor(pathFetcher, trace) {
|
|
@@ -206,7 +228,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
206
228
|
return imports;
|
|
207
229
|
}
|
|
208
230
|
linkImportedSymbols(css) {
|
|
209
|
-
(0,
|
|
231
|
+
(0, _icssutils.replaceSymbols)(css, this.translations);
|
|
210
232
|
}
|
|
211
233
|
extractExports(css) {
|
|
212
234
|
css.each((node) => {
|
|
@@ -227,10 +249,10 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
227
249
|
async fetchImport(importNode, relativeTo, depNr) {
|
|
228
250
|
const file = importNode.selector.match(importRegexp)[1];
|
|
229
251
|
const depTrace = this.trace + String.fromCharCode(depNr);
|
|
230
|
-
const
|
|
252
|
+
const exports1 = await this.pathFetcher(file, relativeTo, depTrace);
|
|
231
253
|
try {
|
|
232
254
|
importNode.each((decl) => {
|
|
233
|
-
if (decl.type == "decl") this.translations[decl.prop] =
|
|
255
|
+
if (decl.type == "decl") this.translations[decl.prop] = exports1[decl.value];
|
|
234
256
|
});
|
|
235
257
|
importNode.remove();
|
|
236
258
|
} catch (err) {
|
|
@@ -238,14 +260,18 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
238
260
|
}
|
|
239
261
|
}
|
|
240
262
|
};
|
|
241
|
-
exports.default = Parser;
|
|
242
263
|
}));
|
|
243
264
|
//#endregion
|
|
244
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
265
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/saveJSON.js
|
|
245
266
|
var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
246
267
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
247
|
-
exports
|
|
248
|
-
|
|
268
|
+
Object.defineProperty(exports, "default", {
|
|
269
|
+
enumerable: true,
|
|
270
|
+
get: function() {
|
|
271
|
+
return saveJSON;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
const _fs = require_fs();
|
|
249
275
|
function saveJSON(cssFile, json) {
|
|
250
276
|
return new Promise((resolve, reject) => {
|
|
251
277
|
const { writeFile } = (0, _fs.getFileSystem)();
|
|
@@ -883,12 +909,17 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
883
909
|
module.exports = camelCase;
|
|
884
910
|
}));
|
|
885
911
|
//#endregion
|
|
886
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
912
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/localsConvention.js
|
|
887
913
|
var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
888
914
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
889
|
-
exports
|
|
890
|
-
|
|
891
|
-
|
|
915
|
+
Object.defineProperty(exports, "makeLocalsConventionReducer", {
|
|
916
|
+
enumerable: true,
|
|
917
|
+
get: function() {
|
|
918
|
+
return makeLocalsConventionReducer;
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
const _lodashcamelcase = /*#__PURE__*/ _interop_require_default(require_lodash_camelcase());
|
|
922
|
+
function _interop_require_default(obj) {
|
|
892
923
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
893
924
|
}
|
|
894
925
|
function dashesCamelCase(string) {
|
|
@@ -899,16 +930,28 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
899
930
|
return (tokens, [className, value]) => {
|
|
900
931
|
if (isFunc) {
|
|
901
932
|
const convention = localsConvention(className, value, inputFile);
|
|
933
|
+
if (Array.isArray(convention)) {
|
|
934
|
+
convention.forEach((name) => tokens[name] = value);
|
|
935
|
+
return tokens;
|
|
936
|
+
}
|
|
902
937
|
tokens[convention] = value;
|
|
903
938
|
return tokens;
|
|
904
939
|
}
|
|
905
940
|
switch (localsConvention) {
|
|
941
|
+
case "none":
|
|
942
|
+
tokens[className] = value;
|
|
943
|
+
break;
|
|
944
|
+
case "all":
|
|
945
|
+
tokens[className] = value;
|
|
946
|
+
tokens[(0, _lodashcamelcase.default)(className)] = value;
|
|
947
|
+
tokens[dashesCamelCase(className)] = value;
|
|
948
|
+
break;
|
|
906
949
|
case "camelCase":
|
|
907
950
|
tokens[className] = value;
|
|
908
|
-
tokens[(0,
|
|
951
|
+
tokens[(0, _lodashcamelcase.default)(className)] = value;
|
|
909
952
|
break;
|
|
910
953
|
case "camelCaseOnly":
|
|
911
|
-
tokens[(0,
|
|
954
|
+
tokens[(0, _lodashcamelcase.default)(className)] = value;
|
|
912
955
|
break;
|
|
913
956
|
case "dashes":
|
|
914
957
|
tokens[className] = value;
|
|
@@ -923,15 +966,20 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
923
966
|
}
|
|
924
967
|
}));
|
|
925
968
|
//#endregion
|
|
926
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
969
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/FileSystemLoader.js
|
|
927
970
|
var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
928
971
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
929
|
-
exports
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
972
|
+
Object.defineProperty(exports, "default", {
|
|
973
|
+
enumerable: true,
|
|
974
|
+
get: function() {
|
|
975
|
+
return FileSystemLoader;
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
const _postcss$1 = /*#__PURE__*/ _interop_require_default(__require("postcss"));
|
|
979
|
+
const _path = /*#__PURE__*/ _interop_require_default(__require("path"));
|
|
980
|
+
const _Parser = /*#__PURE__*/ _interop_require_default(require_Parser());
|
|
981
|
+
const _fs = require_fs();
|
|
982
|
+
function _interop_require_default(obj) {
|
|
935
983
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
936
984
|
}
|
|
937
985
|
var Core = class Core {
|
|
@@ -979,7 +1027,7 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
979
1027
|
let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath);
|
|
980
1028
|
if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) try {
|
|
981
1029
|
fileRelativePath = __require.resolve(newPath);
|
|
982
|
-
} catch
|
|
1030
|
+
} catch {}
|
|
983
1031
|
const tokens = this.tokensByFile[fileRelativePath];
|
|
984
1032
|
if (tokens) return tokens;
|
|
985
1033
|
return new Promise((resolve, reject) => {
|
|
@@ -1005,7 +1053,6 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1005
1053
|
}).join("");
|
|
1006
1054
|
}
|
|
1007
1055
|
};
|
|
1008
|
-
exports.default = FileSystemLoader;
|
|
1009
1056
|
}));
|
|
1010
1057
|
//#endregion
|
|
1011
1058
|
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.16/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
|
|
@@ -1142,10 +1189,13 @@ var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1142
1189
|
declaration.value = values.join(", ");
|
|
1143
1190
|
});
|
|
1144
1191
|
const importsOrder = topologicalSort(graph, failOnWrongOrder);
|
|
1145
|
-
if (importsOrder instanceof Error)
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1192
|
+
if (importsOrder instanceof Error) {
|
|
1193
|
+
const importPath = importsOrder.nodes.find((importPath) => importDecls.hasOwnProperty(importPath));
|
|
1194
|
+
throw importDecls[importPath].error("Failed to resolve order of composed modules " + importsOrder.nodes.map((importPath) => "`" + importPath + "`").join(", ") + ".", {
|
|
1195
|
+
plugin: "postcss-modules-extract-imports",
|
|
1196
|
+
word: "composes"
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1149
1199
|
let lastImportRule;
|
|
1150
1200
|
importsOrder.forEach((path) => {
|
|
1151
1201
|
const importedSymbols = imports[path];
|
|
@@ -5218,43 +5268,58 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5218
5268
|
module.exports.postcss = true;
|
|
5219
5269
|
}));
|
|
5220
5270
|
//#endregion
|
|
5221
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
5271
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/scoping.js
|
|
5222
5272
|
var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5223
5273
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5274
|
+
function _export(target, all) {
|
|
5275
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
5276
|
+
enumerable: true,
|
|
5277
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
5278
|
+
});
|
|
5279
|
+
}
|
|
5280
|
+
_export(exports, {
|
|
5281
|
+
get behaviours() {
|
|
5282
|
+
return behaviours;
|
|
5283
|
+
},
|
|
5284
|
+
get getDefaultPlugins() {
|
|
5285
|
+
return getDefaultPlugins;
|
|
5286
|
+
},
|
|
5287
|
+
get getDefaultScopeBehaviour() {
|
|
5288
|
+
return getDefaultScopeBehaviour;
|
|
5289
|
+
},
|
|
5290
|
+
get getScopedNameGenerator() {
|
|
5291
|
+
return getScopedNameGenerator;
|
|
5292
|
+
}
|
|
5293
|
+
});
|
|
5294
|
+
const _postcssmodulesextractimports = /*#__PURE__*/ _interop_require_default(require_src$3());
|
|
5295
|
+
const _genericnames = /*#__PURE__*/ _interop_require_default(require_generic_names());
|
|
5296
|
+
const _postcssmoduleslocalbydefault = /*#__PURE__*/ _interop_require_default(require_src$2());
|
|
5297
|
+
const _postcssmodulesscope = /*#__PURE__*/ _interop_require_default(require_src$1());
|
|
5298
|
+
const _stringhash = /*#__PURE__*/ _interop_require_default(require_string_hash());
|
|
5299
|
+
const _postcssmodulesvalues = /*#__PURE__*/ _interop_require_default(require_src());
|
|
5300
|
+
function _interop_require_default(obj) {
|
|
5235
5301
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
5236
5302
|
}
|
|
5237
5303
|
const behaviours = {
|
|
5238
5304
|
LOCAL: "local",
|
|
5239
5305
|
GLOBAL: "global"
|
|
5240
5306
|
};
|
|
5241
|
-
exports.behaviours = behaviours;
|
|
5242
5307
|
function getDefaultPlugins({ behaviour, generateScopedName, exportGlobals }) {
|
|
5243
|
-
const scope = (0,
|
|
5308
|
+
const scope = (0, _postcssmodulesscope.default)({
|
|
5244
5309
|
generateScopedName,
|
|
5245
5310
|
exportGlobals
|
|
5246
5311
|
});
|
|
5247
5312
|
return {
|
|
5248
5313
|
[behaviours.LOCAL]: [
|
|
5249
|
-
|
|
5250
|
-
(0,
|
|
5251
|
-
|
|
5314
|
+
_postcssmodulesvalues.default,
|
|
5315
|
+
(0, _postcssmoduleslocalbydefault.default)({ mode: "local" }),
|
|
5316
|
+
_postcssmodulesextractimports.default,
|
|
5252
5317
|
scope
|
|
5253
5318
|
],
|
|
5254
5319
|
[behaviours.GLOBAL]: [
|
|
5255
|
-
|
|
5256
|
-
(0,
|
|
5257
|
-
|
|
5320
|
+
_postcssmodulesvalues.default,
|
|
5321
|
+
(0, _postcssmoduleslocalbydefault.default)({ mode: "global" }),
|
|
5322
|
+
_postcssmodulesextractimports.default,
|
|
5258
5323
|
scope
|
|
5259
5324
|
]
|
|
5260
5325
|
}[behaviour];
|
|
@@ -5265,33 +5330,40 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5265
5330
|
function getDefaultScopeBehaviour(scopeBehaviour) {
|
|
5266
5331
|
return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL;
|
|
5267
5332
|
}
|
|
5268
|
-
function
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5333
|
+
function makeDefaultScopedNameGenerator(hashPrefix) {
|
|
5334
|
+
return function generateScopedNameDefault(name, filename, css) {
|
|
5335
|
+
const i = css.indexOf(`.${name}`);
|
|
5336
|
+
const lineNumber = css.substr(0, i).split(/[\r\n]/).length;
|
|
5337
|
+
return `_${name}_${(0, _stringhash.default)(`${hashPrefix || ""}${css}`).toString(36).substr(0, 5)}_${lineNumber}`;
|
|
5338
|
+
};
|
|
5272
5339
|
}
|
|
5273
5340
|
function getScopedNameGenerator(generateScopedName, hashPrefix) {
|
|
5274
|
-
const scopedNameGenerator = generateScopedName ||
|
|
5341
|
+
const scopedNameGenerator = generateScopedName || makeDefaultScopedNameGenerator(hashPrefix);
|
|
5275
5342
|
if (typeof scopedNameGenerator === "function") return scopedNameGenerator;
|
|
5276
|
-
return (0,
|
|
5343
|
+
return (0, _genericnames.default)(scopedNameGenerator, {
|
|
5277
5344
|
context: process.cwd(),
|
|
5278
5345
|
hashPrefix
|
|
5279
5346
|
});
|
|
5280
5347
|
}
|
|
5281
5348
|
}));
|
|
5282
5349
|
//#endregion
|
|
5283
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
5350
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/pluginFactory.js
|
|
5284
5351
|
var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5285
5352
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5286
|
-
exports
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5353
|
+
Object.defineProperty(exports, "makePlugin", {
|
|
5354
|
+
enumerable: true,
|
|
5355
|
+
get: function() {
|
|
5356
|
+
return makePlugin;
|
|
5357
|
+
}
|
|
5358
|
+
});
|
|
5359
|
+
const _postcss = /*#__PURE__*/ _interop_require_default(__require("postcss"));
|
|
5360
|
+
const _unquote = /*#__PURE__*/ _interop_require_default(require_unquote());
|
|
5361
|
+
const _Parser = /*#__PURE__*/ _interop_require_default(require_Parser());
|
|
5362
|
+
const _saveJSON = /*#__PURE__*/ _interop_require_default(require_saveJSON());
|
|
5363
|
+
const _localsConvention = require_localsConvention();
|
|
5364
|
+
const _FileSystemLoader = /*#__PURE__*/ _interop_require_default(require_FileSystemLoader());
|
|
5365
|
+
const _scoping = require_scoping();
|
|
5366
|
+
function _interop_require_default(obj) {
|
|
5295
5367
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
5296
5368
|
}
|
|
5297
5369
|
const PLUGIN_NAME = "postcss-modules";
|
|
@@ -5337,6 +5409,9 @@ var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5337
5409
|
};
|
|
5338
5410
|
const parser = new _Parser.default(fetcher);
|
|
5339
5411
|
await (0, _postcss.default)([...pluginList, parser.plugin()]).process(css, { from: inputFile });
|
|
5412
|
+
css.walkRules((rule) => {
|
|
5413
|
+
if (rule.selector.trim() === "") rule.remove();
|
|
5414
|
+
});
|
|
5340
5415
|
const out = loader.finalSource;
|
|
5341
5416
|
if (out) css.prepend(out);
|
|
5342
5417
|
if (opts.localsConvention) {
|
|
@@ -5354,12 +5429,13 @@ var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5354
5429
|
}
|
|
5355
5430
|
}));
|
|
5356
5431
|
//#endregion
|
|
5357
|
-
//#region ../../node_modules/.pnpm/postcss-modules@
|
|
5432
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.0_patch_hash=0c886ee83450c5fd20d2c88b3ba2cf5d3afbb9c440755757f311439897188056_postcss@8.5.16/node_modules/postcss-modules/build/index.js
|
|
5358
5433
|
var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
(
|
|
5434
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5435
|
+
const _fs = __require("fs");
|
|
5436
|
+
const _fs1 = require_fs();
|
|
5437
|
+
const _pluginFactory = require_pluginFactory();
|
|
5438
|
+
(0, _fs1.setFileSystem)({
|
|
5363
5439
|
readFile: _fs.readFile,
|
|
5364
5440
|
writeFile: _fs.writeFile
|
|
5365
5441
|
});
|
package/dist/node/chunks/lib.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ft as __commonJSMin } from "./node.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js
|
|
3
3
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
4
|
var openParentheses = "(".charCodeAt(0);
|