@modern-js/builder 3.0.0 → 3.0.2
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/cjs/createBuilder.js +3 -8
- package/dist/cjs/plugins/environmentDefaults.js +4 -4
- package/dist/cjs/plugins/postcss.js +8 -31
- package/dist/cjs/plugins/rscConfig.js +159 -0
- package/dist/cjs/{rsc/rsc-css-loader.js → shared/rsc/rsc-server-entry-loader.js} +6 -7
- package/dist/esm/createBuilder.mjs +3 -8
- package/dist/esm/plugins/environmentDefaults.mjs +4 -4
- package/dist/esm/plugins/postcss.mjs +8 -31
- package/dist/esm/plugins/rscConfig.mjs +112 -0
- package/dist/esm/shared/rsc/rsc-server-entry-loader.mjs +7 -0
- package/dist/esm-node/createBuilder.mjs +3 -8
- package/dist/esm-node/plugins/environmentDefaults.mjs +4 -4
- package/dist/esm-node/plugins/postcss.mjs +8 -31
- package/dist/esm-node/plugins/rscConfig.mjs +117 -0
- package/dist/esm-node/shared/rsc/rsc-server-entry-loader.mjs +8 -0
- package/dist/types/plugins/postcss.d.ts +1 -1
- package/dist/types/plugins/rscConfig.d.ts +18 -0
- package/dist/types/shared/rsc/rsc-server-entry-loader.d.ts +5 -0
- package/package.json +7 -8
- package/compiled/postcss-load-config/index.d.ts +0 -1
- package/compiled/postcss-load-config/index.js +0 -14
- package/compiled/postcss-load-config/license +0 -20
- package/compiled/postcss-load-config/package.json +0 -1
- package/dist/cjs/rsc/common.js +0 -157
- package/dist/cjs/rsc/plugins/rsbuild-rsc-plugin.js +0 -169
- package/dist/cjs/rsc/plugins/rspack-rsc-client-plugin.js +0 -187
- package/dist/cjs/rsc/plugins/rspack-rsc-server-plugin.js +0 -245
- package/dist/cjs/rsc/rsc-client-loader.js +0 -71
- package/dist/cjs/rsc/rsc-server-loader.js +0 -102
- package/dist/cjs/rsc/rsc-ssr-loader.js +0 -60
- package/dist/compiled/postcss-load-config/index.d.ts +0 -1
- package/dist/compiled/postcss-load-config/index.js +0 -608
- package/dist/compiled/postcss-load-config/index.js.LICENSE.txt +0 -13
- package/dist/compiled/postcss-load-config/license +0 -20
- package/dist/compiled/postcss-load-config/package.json +0 -1
- package/dist/esm/rsc/common.mjs +0 -87
- package/dist/esm/rsc/plugins/rsbuild-rsc-plugin.mjs +0 -124
- package/dist/esm/rsc/plugins/rspack-rsc-client-plugin.mjs +0 -143
- package/dist/esm/rsc/plugins/rspack-rsc-server-plugin.mjs +0 -211
- package/dist/esm/rsc/rsc-client-loader.mjs +0 -37
- package/dist/esm/rsc/rsc-css-loader.mjs +0 -8
- package/dist/esm/rsc/rsc-server-loader.mjs +0 -58
- package/dist/esm/rsc/rsc-ssr-loader.mjs +0 -26
- package/dist/esm-node/rsc/common.mjs +0 -88
- package/dist/esm-node/rsc/plugins/rsbuild-rsc-plugin.mjs +0 -126
- package/dist/esm-node/rsc/plugins/rspack-rsc-client-plugin.mjs +0 -144
- package/dist/esm-node/rsc/plugins/rspack-rsc-server-plugin.mjs +0 -212
- package/dist/esm-node/rsc/rsc-client-loader.mjs +0 -38
- package/dist/esm-node/rsc/rsc-css-loader.mjs +0 -9
- package/dist/esm-node/rsc/rsc-server-loader.mjs +0 -60
- package/dist/esm-node/rsc/rsc-ssr-loader.mjs +0 -27
- package/dist/types/rsc/common.d.ts +0 -22
- package/dist/types/rsc/plugins/rsbuild-rsc-plugin.d.ts +0 -7
- package/dist/types/rsc/plugins/rspack-rsc-client-plugin.d.ts +0 -14
- package/dist/types/rsc/plugins/rspack-rsc-server-plugin.d.ts +0 -32
- package/dist/types/rsc/rsc-client-loader.d.ts +0 -7
- package/dist/types/rsc/rsc-css-loader.d.ts +0 -2
- package/dist/types/rsc/rsc-server-loader.d.ts +0 -6
- package/dist/types/rsc/rsc-ssr-loader.d.ts +0 -6
|
@@ -1,608 +0,0 @@
|
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{
|
|
3
|
-
var __webpack_modules__ = {
|
|
4
|
-
920: (module1, __unused_webpack_exports, __nccwpck_require__)=>{
|
|
5
|
-
const path = __nccwpck_require__(928);
|
|
6
|
-
const fs = __nccwpck_require__(896);
|
|
7
|
-
const os = __nccwpck_require__(857);
|
|
8
|
-
const url = __nccwpck_require__(16);
|
|
9
|
-
const fsReadFileAsync = fs.promises.readFile;
|
|
10
|
-
function getDefaultSearchPlaces(e, t) {
|
|
11
|
-
return [
|
|
12
|
-
"package.json",
|
|
13
|
-
`.${e}rc.json`,
|
|
14
|
-
`.${e}rc.js`,
|
|
15
|
-
`.${e}rc.cjs`,
|
|
16
|
-
...t ? [] : [
|
|
17
|
-
`.${e}rc.mjs`
|
|
18
|
-
],
|
|
19
|
-
`.config/${e}rc`,
|
|
20
|
-
`.config/${e}rc.json`,
|
|
21
|
-
`.config/${e}rc.js`,
|
|
22
|
-
`.config/${e}rc.cjs`,
|
|
23
|
-
...t ? [] : [
|
|
24
|
-
`.config/${e}rc.mjs`
|
|
25
|
-
],
|
|
26
|
-
`${e}.config.js`,
|
|
27
|
-
`${e}.config.cjs`,
|
|
28
|
-
...t ? [] : [
|
|
29
|
-
`${e}.config.mjs`
|
|
30
|
-
]
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
function parentDir(e) {
|
|
34
|
-
return path.dirname(e) || path.sep;
|
|
35
|
-
}
|
|
36
|
-
const jsonLoader = (e, t)=>JSON.parse(t);
|
|
37
|
-
const requireFunc = eval("require");
|
|
38
|
-
const defaultLoadersSync = Object.freeze({
|
|
39
|
-
".js": requireFunc,
|
|
40
|
-
".json": requireFunc,
|
|
41
|
-
".cjs": requireFunc,
|
|
42
|
-
noExt: jsonLoader
|
|
43
|
-
});
|
|
44
|
-
module1.exports.defaultLoadersSync = defaultLoadersSync;
|
|
45
|
-
const dynamicImport = async (e)=>{
|
|
46
|
-
try {
|
|
47
|
-
const t = url.pathToFileURL(e).href;
|
|
48
|
-
const r = await import(t);
|
|
49
|
-
return r.default;
|
|
50
|
-
} catch (t) {
|
|
51
|
-
try {
|
|
52
|
-
return requireFunc(e);
|
|
53
|
-
} catch (e) {
|
|
54
|
-
if ("ERR_REQUIRE_ESM" === e.code || e instanceof SyntaxError && e.toString().includes("Cannot use import statement outside a module")) throw t;
|
|
55
|
-
throw e;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const defaultLoaders = Object.freeze({
|
|
60
|
-
".js": dynamicImport,
|
|
61
|
-
".mjs": dynamicImport,
|
|
62
|
-
".cjs": dynamicImport,
|
|
63
|
-
".json": jsonLoader,
|
|
64
|
-
noExt: jsonLoader
|
|
65
|
-
});
|
|
66
|
-
module1.exports.defaultLoaders = defaultLoaders;
|
|
67
|
-
function getOptions(e, t, r) {
|
|
68
|
-
const n = {
|
|
69
|
-
stopDir: os.homedir(),
|
|
70
|
-
searchPlaces: getDefaultSearchPlaces(e, r),
|
|
71
|
-
ignoreEmptySearchPlaces: true,
|
|
72
|
-
cache: true,
|
|
73
|
-
transform: (e)=>e,
|
|
74
|
-
packageProp: [
|
|
75
|
-
e
|
|
76
|
-
],
|
|
77
|
-
...t,
|
|
78
|
-
loaders: {
|
|
79
|
-
...r ? defaultLoadersSync : defaultLoaders,
|
|
80
|
-
...t.loaders
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
n.searchPlaces.forEach((e)=>{
|
|
84
|
-
const t = path.extname(e) || "noExt";
|
|
85
|
-
const r = n.loaders[t];
|
|
86
|
-
if (!r) throw new Error(`Missing loader for extension "${e}"`);
|
|
87
|
-
if ("function" != typeof r) throw new Error(`Loader for extension "${e}" is not a function: Received ${typeof r}.`);
|
|
88
|
-
});
|
|
89
|
-
return n;
|
|
90
|
-
}
|
|
91
|
-
function getPackageProp(e, t) {
|
|
92
|
-
if ("string" == typeof e && e in t) return t[e];
|
|
93
|
-
return (Array.isArray(e) ? e : e.split(".")).reduce((e, t)=>void 0 === e ? e : e[t], t) || null;
|
|
94
|
-
}
|
|
95
|
-
function validateFilePath(e) {
|
|
96
|
-
if (!e) throw new Error("load must pass a non-empty string");
|
|
97
|
-
}
|
|
98
|
-
function validateLoader(e, t) {
|
|
99
|
-
if (!e) throw new Error(`No loader specified for extension "${t}"`);
|
|
100
|
-
if ("function" != typeof e) throw new Error("loader is not a function");
|
|
101
|
-
}
|
|
102
|
-
const makeEmplace = (e)=>(t, r, n)=>{
|
|
103
|
-
if (e) t.set(r, n);
|
|
104
|
-
return n;
|
|
105
|
-
};
|
|
106
|
-
module1.exports.lilconfig = function(e, t) {
|
|
107
|
-
const { ignoreEmptySearchPlaces: r, loaders: n, packageProp: o, searchPlaces: a, stopDir: s, transform: c, cache: i } = getOptions(e, t ?? {}, false);
|
|
108
|
-
const f = new Map;
|
|
109
|
-
const l = new Map;
|
|
110
|
-
const u = makeEmplace(i);
|
|
111
|
-
return {
|
|
112
|
-
async search (e = process.cwd()) {
|
|
113
|
-
const t = {
|
|
114
|
-
config: null,
|
|
115
|
-
filepath: ""
|
|
116
|
-
};
|
|
117
|
-
const l = new Set;
|
|
118
|
-
let u = e;
|
|
119
|
-
e: while(true){
|
|
120
|
-
if (i) {
|
|
121
|
-
const e = f.get(u);
|
|
122
|
-
if (void 0 !== e) {
|
|
123
|
-
for (const t of l)f.set(t, e);
|
|
124
|
-
return e;
|
|
125
|
-
}
|
|
126
|
-
l.add(u);
|
|
127
|
-
}
|
|
128
|
-
for (const e of a){
|
|
129
|
-
const a = path.join(u, e);
|
|
130
|
-
try {
|
|
131
|
-
await fs.promises.access(a);
|
|
132
|
-
} catch {
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
const s = String(await fsReadFileAsync(a));
|
|
136
|
-
const c = path.extname(e) || "noExt";
|
|
137
|
-
const i = n[c];
|
|
138
|
-
if ("package.json" === e) {
|
|
139
|
-
const e = await i(a, s);
|
|
140
|
-
const r = getPackageProp(o, e);
|
|
141
|
-
if (null != r) {
|
|
142
|
-
t.config = r;
|
|
143
|
-
t.filepath = a;
|
|
144
|
-
break e;
|
|
145
|
-
}
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
const f = "" === s.trim();
|
|
149
|
-
if (!f || !r) {
|
|
150
|
-
if (f) {
|
|
151
|
-
t.isEmpty = true;
|
|
152
|
-
t.config = void 0;
|
|
153
|
-
} else {
|
|
154
|
-
validateLoader(i, c);
|
|
155
|
-
t.config = await i(a, s);
|
|
156
|
-
}
|
|
157
|
-
t.filepath = a;
|
|
158
|
-
break e;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (u === s || u === parentDir(u)) break;
|
|
162
|
-
u = parentDir(u);
|
|
163
|
-
}
|
|
164
|
-
const p = "" === t.filepath && null === t.config ? c(null) : c(t);
|
|
165
|
-
if (i) for (const e of l)f.set(e, p);
|
|
166
|
-
return p;
|
|
167
|
-
},
|
|
168
|
-
async load (e) {
|
|
169
|
-
validateFilePath(e);
|
|
170
|
-
const t = path.resolve(process.cwd(), e);
|
|
171
|
-
if (i && l.has(t)) return l.get(t);
|
|
172
|
-
const { base: a, ext: s } = path.parse(t);
|
|
173
|
-
const f = s || "noExt";
|
|
174
|
-
const p = n[f];
|
|
175
|
-
validateLoader(p, f);
|
|
176
|
-
const d = String(await fsReadFileAsync(t));
|
|
177
|
-
if ("package.json" === a) {
|
|
178
|
-
const e = await p(t, d);
|
|
179
|
-
return u(l, t, c({
|
|
180
|
-
config: getPackageProp(o, e),
|
|
181
|
-
filepath: t
|
|
182
|
-
}));
|
|
183
|
-
}
|
|
184
|
-
const _ = {
|
|
185
|
-
config: null,
|
|
186
|
-
filepath: t
|
|
187
|
-
};
|
|
188
|
-
const g = "" === d.trim();
|
|
189
|
-
if (g && r) return u(l, t, c({
|
|
190
|
-
config: void 0,
|
|
191
|
-
filepath: t,
|
|
192
|
-
isEmpty: true
|
|
193
|
-
}));
|
|
194
|
-
_.config = g ? void 0 : await p(t, d);
|
|
195
|
-
return u(l, t, c(g ? {
|
|
196
|
-
..._,
|
|
197
|
-
isEmpty: g,
|
|
198
|
-
config: void 0
|
|
199
|
-
} : _));
|
|
200
|
-
},
|
|
201
|
-
clearLoadCache () {
|
|
202
|
-
if (i) l.clear();
|
|
203
|
-
},
|
|
204
|
-
clearSearchCache () {
|
|
205
|
-
if (i) f.clear();
|
|
206
|
-
},
|
|
207
|
-
clearCaches () {
|
|
208
|
-
if (i) {
|
|
209
|
-
l.clear();
|
|
210
|
-
f.clear();
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
module1.exports.lilconfigSync = function(e, t) {
|
|
216
|
-
const { ignoreEmptySearchPlaces: r, loaders: n, packageProp: o, searchPlaces: a, stopDir: s, transform: c, cache: i } = getOptions(e, t ?? {}, true);
|
|
217
|
-
const f = new Map;
|
|
218
|
-
const l = new Map;
|
|
219
|
-
const u = makeEmplace(i);
|
|
220
|
-
return {
|
|
221
|
-
search (e = process.cwd()) {
|
|
222
|
-
const t = {
|
|
223
|
-
config: null,
|
|
224
|
-
filepath: ""
|
|
225
|
-
};
|
|
226
|
-
const l = new Set;
|
|
227
|
-
let u = e;
|
|
228
|
-
e: while(true){
|
|
229
|
-
if (i) {
|
|
230
|
-
const e = f.get(u);
|
|
231
|
-
if (void 0 !== e) {
|
|
232
|
-
for (const t of l)f.set(t, e);
|
|
233
|
-
return e;
|
|
234
|
-
}
|
|
235
|
-
l.add(u);
|
|
236
|
-
}
|
|
237
|
-
for (const e of a){
|
|
238
|
-
const a = path.join(u, e);
|
|
239
|
-
try {
|
|
240
|
-
fs.accessSync(a);
|
|
241
|
-
} catch {
|
|
242
|
-
continue;
|
|
243
|
-
}
|
|
244
|
-
const s = path.extname(e) || "noExt";
|
|
245
|
-
const c = n[s];
|
|
246
|
-
const i = String(fs.readFileSync(a));
|
|
247
|
-
if ("package.json" === e) {
|
|
248
|
-
const e = c(a, i);
|
|
249
|
-
const r = getPackageProp(o, e);
|
|
250
|
-
if (null != r) {
|
|
251
|
-
t.config = r;
|
|
252
|
-
t.filepath = a;
|
|
253
|
-
break e;
|
|
254
|
-
}
|
|
255
|
-
continue;
|
|
256
|
-
}
|
|
257
|
-
const f = "" === i.trim();
|
|
258
|
-
if (!f || !r) {
|
|
259
|
-
if (f) {
|
|
260
|
-
t.isEmpty = true;
|
|
261
|
-
t.config = void 0;
|
|
262
|
-
} else {
|
|
263
|
-
validateLoader(c, s);
|
|
264
|
-
t.config = c(a, i);
|
|
265
|
-
}
|
|
266
|
-
t.filepath = a;
|
|
267
|
-
break e;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
if (u === s || u === parentDir(u)) break;
|
|
271
|
-
u = parentDir(u);
|
|
272
|
-
}
|
|
273
|
-
const p = "" === t.filepath && null === t.config ? c(null) : c(t);
|
|
274
|
-
if (i) for (const e of l)f.set(e, p);
|
|
275
|
-
return p;
|
|
276
|
-
},
|
|
277
|
-
load (e) {
|
|
278
|
-
validateFilePath(e);
|
|
279
|
-
const t = path.resolve(process.cwd(), e);
|
|
280
|
-
if (i && l.has(t)) return l.get(t);
|
|
281
|
-
const { base: a, ext: s } = path.parse(t);
|
|
282
|
-
const f = s || "noExt";
|
|
283
|
-
const p = n[f];
|
|
284
|
-
validateLoader(p, f);
|
|
285
|
-
const d = String(fs.readFileSync(t));
|
|
286
|
-
if ("package.json" === a) {
|
|
287
|
-
const e = p(t, d);
|
|
288
|
-
return c({
|
|
289
|
-
config: getPackageProp(o, e),
|
|
290
|
-
filepath: t
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
const _ = {
|
|
294
|
-
config: null,
|
|
295
|
-
filepath: t
|
|
296
|
-
};
|
|
297
|
-
const g = "" === d.trim();
|
|
298
|
-
if (g && r) return u(l, t, c({
|
|
299
|
-
filepath: t,
|
|
300
|
-
config: void 0,
|
|
301
|
-
isEmpty: true
|
|
302
|
-
}));
|
|
303
|
-
_.config = g ? void 0 : p(t, d);
|
|
304
|
-
return u(l, t, c(g ? {
|
|
305
|
-
..._,
|
|
306
|
-
isEmpty: g,
|
|
307
|
-
config: void 0
|
|
308
|
-
} : _));
|
|
309
|
-
},
|
|
310
|
-
clearLoadCache () {
|
|
311
|
-
if (i) l.clear();
|
|
312
|
-
},
|
|
313
|
-
clearSearchCache () {
|
|
314
|
-
if (i) f.clear();
|
|
315
|
-
},
|
|
316
|
-
clearCaches () {
|
|
317
|
-
if (i) {
|
|
318
|
-
l.clear();
|
|
319
|
-
f.clear();
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
},
|
|
325
|
-
109: (e, t, r)=>{
|
|
326
|
-
const { resolve: n } = r(760);
|
|
327
|
-
const o = r(920);
|
|
328
|
-
const a = r(471);
|
|
329
|
-
const s = r(697);
|
|
330
|
-
const c = r(257);
|
|
331
|
-
const interopRequireDefault = (e)=>e && e.__esModule ? e : {
|
|
332
|
-
default: e
|
|
333
|
-
};
|
|
334
|
-
async function processResult(e, t) {
|
|
335
|
-
let r = t.filepath || "";
|
|
336
|
-
let n = interopRequireDefault(t.config).default || {};
|
|
337
|
-
n = "function" == typeof n ? n(e) : Object.assign({}, n, e);
|
|
338
|
-
if (!n.plugins) n.plugins = [];
|
|
339
|
-
let o = {
|
|
340
|
-
file: r,
|
|
341
|
-
options: await a(n, r),
|
|
342
|
-
plugins: await s(n, r)
|
|
343
|
-
};
|
|
344
|
-
delete n.plugins;
|
|
345
|
-
return o;
|
|
346
|
-
}
|
|
347
|
-
function createContext(e) {
|
|
348
|
-
e = Object.assign({
|
|
349
|
-
cwd: process.cwd(),
|
|
350
|
-
env: process.env.NODE_ENV
|
|
351
|
-
}, e);
|
|
352
|
-
if (!e.env) process.env.NODE_ENV = "development";
|
|
353
|
-
return e;
|
|
354
|
-
}
|
|
355
|
-
async function loader(e) {
|
|
356
|
-
return c(e);
|
|
357
|
-
}
|
|
358
|
-
let i;
|
|
359
|
-
async function yamlLoader(e, t) {
|
|
360
|
-
if (!i) try {
|
|
361
|
-
i = await Promise.resolve().then(r.t.bind(r, 160, 23));
|
|
362
|
-
} catch (e) {
|
|
363
|
-
throw new Error(`'yaml' is required for the YAML configuration files. Make sure it is installed\nError: ${e.message}`);
|
|
364
|
-
}
|
|
365
|
-
return i.parse(t);
|
|
366
|
-
}
|
|
367
|
-
const withLoaders = (e = {})=>{
|
|
368
|
-
let t = "postcss";
|
|
369
|
-
return {
|
|
370
|
-
...e,
|
|
371
|
-
loaders: {
|
|
372
|
-
...e.loaders,
|
|
373
|
-
".cjs": loader,
|
|
374
|
-
".cts": loader,
|
|
375
|
-
".js": loader,
|
|
376
|
-
".mjs": loader,
|
|
377
|
-
".mts": loader,
|
|
378
|
-
".ts": loader,
|
|
379
|
-
".yaml": yamlLoader,
|
|
380
|
-
".yml": yamlLoader
|
|
381
|
-
},
|
|
382
|
-
searchPlaces: [
|
|
383
|
-
...e.searchPlaces || [],
|
|
384
|
-
"package.json",
|
|
385
|
-
`.${t}rc`,
|
|
386
|
-
`.${t}rc.json`,
|
|
387
|
-
`.${t}rc.yaml`,
|
|
388
|
-
`.${t}rc.yml`,
|
|
389
|
-
`.${t}rc.ts`,
|
|
390
|
-
`.${t}rc.cts`,
|
|
391
|
-
`.${t}rc.mts`,
|
|
392
|
-
`.${t}rc.js`,
|
|
393
|
-
`.${t}rc.cjs`,
|
|
394
|
-
`.${t}rc.mjs`,
|
|
395
|
-
`${t}.config.ts`,
|
|
396
|
-
`${t}.config.cts`,
|
|
397
|
-
`${t}.config.mts`,
|
|
398
|
-
`${t}.config.js`,
|
|
399
|
-
`${t}.config.cjs`,
|
|
400
|
-
`${t}.config.mjs`
|
|
401
|
-
]
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
function rc(e, t, r) {
|
|
405
|
-
e = createContext(e);
|
|
406
|
-
t = t ? n(t) : process.cwd();
|
|
407
|
-
return o.lilconfig("postcss", withLoaders(r)).search(t).then((r)=>{
|
|
408
|
-
if (!r) throw new Error(`No PostCSS Config found in: ${t}`);
|
|
409
|
-
return processResult(e, r);
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Autoload Config for PostCSS
|
|
414
|
-
*
|
|
415
|
-
* @author Michael Ciniawsky @michael-ciniawsky <michael.ciniawsky@gmail.com>
|
|
416
|
-
* @license MIT
|
|
417
|
-
*
|
|
418
|
-
* @module postcss-load-config
|
|
419
|
-
* @version 2.1.0
|
|
420
|
-
*
|
|
421
|
-
* @requires comsiconfig
|
|
422
|
-
* @requires ./options
|
|
423
|
-
* @requires ./plugins
|
|
424
|
-
*/ e.exports = rc;
|
|
425
|
-
},
|
|
426
|
-
471: (e, t, r)=>{
|
|
427
|
-
const n = r(257);
|
|
428
|
-
async function options(e, t) {
|
|
429
|
-
if (e.parser && "string" == typeof e.parser) try {
|
|
430
|
-
e.parser = await n(e.parser, t);
|
|
431
|
-
} catch (e) {
|
|
432
|
-
throw new Error(`Loading PostCSS Parser failed: ${e.message}\n\n(@${t})`);
|
|
433
|
-
}
|
|
434
|
-
if (e.syntax && "string" == typeof e.syntax) try {
|
|
435
|
-
e.syntax = await n(e.syntax, t);
|
|
436
|
-
} catch (e) {
|
|
437
|
-
throw new Error(`Loading PostCSS Syntax failed: ${e.message}\n\n(@${t})`);
|
|
438
|
-
}
|
|
439
|
-
if (e.stringifier && "string" == typeof e.stringifier) try {
|
|
440
|
-
e.stringifier = await n(e.stringifier, t);
|
|
441
|
-
} catch (e) {
|
|
442
|
-
throw new Error(`Loading PostCSS Stringifier failed: ${e.message}\n\n(@${t})`);
|
|
443
|
-
}
|
|
444
|
-
return e;
|
|
445
|
-
}
|
|
446
|
-
e.exports = options;
|
|
447
|
-
},
|
|
448
|
-
697: (e, t, r)=>{
|
|
449
|
-
const n = r(257);
|
|
450
|
-
async function load(e, t, r) {
|
|
451
|
-
try {
|
|
452
|
-
if (null == t || 0 === Object.keys(t).length) return await n(e, r);
|
|
453
|
-
return (await n(e, r))(t);
|
|
454
|
-
} catch (e) {
|
|
455
|
-
throw new Error(`Loading PostCSS Plugin failed: ${e.message}\n\n(@${r})`);
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
async function plugins(e, t) {
|
|
459
|
-
let r = [];
|
|
460
|
-
if (Array.isArray(e.plugins)) r = e.plugins.filter(Boolean);
|
|
461
|
-
else {
|
|
462
|
-
r = Object.entries(e.plugins).filter(([, e])=>false !== e).map(([e, r])=>load(e, r, t));
|
|
463
|
-
r = await Promise.all(r);
|
|
464
|
-
}
|
|
465
|
-
if (r.length && r.length > 0) r.forEach((e, r)=>{
|
|
466
|
-
if (e.default) e = e.default;
|
|
467
|
-
if (true === e.postcss) e = e();
|
|
468
|
-
else if (e.postcss) e = e.postcss;
|
|
469
|
-
if (!("object" == typeof e && Array.isArray(e.plugins) || "object" == typeof e && e.postcssPlugin || "function" == typeof e)) throw new TypeError(`Invalid PostCSS Plugin found at: plugins[${r}]\n\n(@${t})`);
|
|
470
|
-
});
|
|
471
|
-
return r;
|
|
472
|
-
}
|
|
473
|
-
e.exports = plugins;
|
|
474
|
-
},
|
|
475
|
-
257: (e, t, r)=>{
|
|
476
|
-
const { createRequire: n } = r(995);
|
|
477
|
-
const { pathToFileURL: o } = r(136);
|
|
478
|
-
const a = /\.[mc]?ts$/;
|
|
479
|
-
let s;
|
|
480
|
-
let c;
|
|
481
|
-
let i = [];
|
|
482
|
-
async function req(e, t = __filename) {
|
|
483
|
-
let r = n(t).resolve(e);
|
|
484
|
-
try {
|
|
485
|
-
return (await import(`${o(r)}?t=${Date.now()}`)).default;
|
|
486
|
-
} catch (e) {
|
|
487
|
-
if (!a.test(r)) throw e;
|
|
488
|
-
}
|
|
489
|
-
if (void 0 === s) try {
|
|
490
|
-
s = await import("tsx/cjs/api");
|
|
491
|
-
} catch (e) {
|
|
492
|
-
i.push(e);
|
|
493
|
-
}
|
|
494
|
-
if (s) {
|
|
495
|
-
let r = s.require(e, t);
|
|
496
|
-
return r && "__esModule" in r ? r.default : r;
|
|
497
|
-
}
|
|
498
|
-
if (void 0 === c) try {
|
|
499
|
-
c = (await import("jiti")).default;
|
|
500
|
-
} catch (e) {
|
|
501
|
-
i.push(e);
|
|
502
|
-
}
|
|
503
|
-
if (c) return c(t, {
|
|
504
|
-
interopDefault: true
|
|
505
|
-
})(e);
|
|
506
|
-
throw new Error(`'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${i.map((e)=>e.message).join("\n")}`);
|
|
507
|
-
}
|
|
508
|
-
e.exports = req;
|
|
509
|
-
},
|
|
510
|
-
896: (e)=>{
|
|
511
|
-
"use strict";
|
|
512
|
-
e.exports = require("fs");
|
|
513
|
-
},
|
|
514
|
-
995: (e)=>{
|
|
515
|
-
"use strict";
|
|
516
|
-
e.exports = require("node:module");
|
|
517
|
-
},
|
|
518
|
-
760: (e)=>{
|
|
519
|
-
"use strict";
|
|
520
|
-
e.exports = require("node:path");
|
|
521
|
-
},
|
|
522
|
-
136: (e)=>{
|
|
523
|
-
"use strict";
|
|
524
|
-
e.exports = require("node:url");
|
|
525
|
-
},
|
|
526
|
-
857: (e)=>{
|
|
527
|
-
"use strict";
|
|
528
|
-
e.exports = require("os");
|
|
529
|
-
},
|
|
530
|
-
928: (e)=>{
|
|
531
|
-
"use strict";
|
|
532
|
-
e.exports = require("path");
|
|
533
|
-
},
|
|
534
|
-
16: (e)=>{
|
|
535
|
-
"use strict";
|
|
536
|
-
e.exports = require("url");
|
|
537
|
-
},
|
|
538
|
-
160: (e)=>{
|
|
539
|
-
"use strict";
|
|
540
|
-
e.exports = require("yaml");
|
|
541
|
-
}
|
|
542
|
-
};
|
|
543
|
-
var __webpack_module_cache__ = {};
|
|
544
|
-
function __nccwpck_require__(e) {
|
|
545
|
-
var t = __webpack_module_cache__[e];
|
|
546
|
-
if (void 0 !== t) return t.exports;
|
|
547
|
-
var r = __webpack_module_cache__[e] = {
|
|
548
|
-
exports: {}
|
|
549
|
-
};
|
|
550
|
-
var n = true;
|
|
551
|
-
try {
|
|
552
|
-
__webpack_modules__[e](r, r.exports, __nccwpck_require__);
|
|
553
|
-
n = false;
|
|
554
|
-
} finally{
|
|
555
|
-
if (n) delete __webpack_module_cache__[e];
|
|
556
|
-
}
|
|
557
|
-
return r.exports;
|
|
558
|
-
}
|
|
559
|
-
(()=>{
|
|
560
|
-
var e = Object.getPrototypeOf ? (e)=>Object.getPrototypeOf(e) : (e)=>e.__proto__;
|
|
561
|
-
var t;
|
|
562
|
-
__nccwpck_require__.t = function(r, n) {
|
|
563
|
-
if (1 & n) r = this(r);
|
|
564
|
-
if (8 & n) return r;
|
|
565
|
-
if ("object" == typeof r && r) {
|
|
566
|
-
if (4 & n && r.__esModule) return r;
|
|
567
|
-
if (16 & n && "function" == typeof r.then) return r;
|
|
568
|
-
}
|
|
569
|
-
var o = Object.create(null);
|
|
570
|
-
__nccwpck_require__.r(o);
|
|
571
|
-
var a = {};
|
|
572
|
-
t = t || [
|
|
573
|
-
null,
|
|
574
|
-
e({}),
|
|
575
|
-
e([]),
|
|
576
|
-
e(e)
|
|
577
|
-
];
|
|
578
|
-
for(var s = 2 & n && r; "object" == typeof s && !~t.indexOf(s); s = e(s))Object.getOwnPropertyNames(s).forEach((e)=>a[e] = ()=>r[e]);
|
|
579
|
-
a["default"] = ()=>r;
|
|
580
|
-
__nccwpck_require__.d(o, a);
|
|
581
|
-
return o;
|
|
582
|
-
};
|
|
583
|
-
})();
|
|
584
|
-
(()=>{
|
|
585
|
-
__nccwpck_require__.d = (e, t)=>{
|
|
586
|
-
for(var r in t)if (__nccwpck_require__.o(t, r) && !__nccwpck_require__.o(e, r)) Object.defineProperty(e, r, {
|
|
587
|
-
enumerable: true,
|
|
588
|
-
get: t[r]
|
|
589
|
-
});
|
|
590
|
-
};
|
|
591
|
-
})();
|
|
592
|
-
(()=>{
|
|
593
|
-
__nccwpck_require__.o = (e, t)=>Object.prototype.hasOwnProperty.call(e, t);
|
|
594
|
-
})();
|
|
595
|
-
(()=>{
|
|
596
|
-
__nccwpck_require__.r = (e)=>{
|
|
597
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(e, Symbol.toStringTag, {
|
|
598
|
-
value: "Module"
|
|
599
|
-
});
|
|
600
|
-
Object.defineProperty(e, "__esModule", {
|
|
601
|
-
value: true
|
|
602
|
-
});
|
|
603
|
-
};
|
|
604
|
-
})();
|
|
605
|
-
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
606
|
-
var __webpack_exports__ = __nccwpck_require__(109);
|
|
607
|
-
module.exports = __webpack_exports__;
|
|
608
|
-
})();
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Autoload Config for PostCSS
|
|
3
|
-
*
|
|
4
|
-
* @author Michael Ciniawsky @michael-ciniawsky <michael.ciniawsky@gmail.com>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*
|
|
7
|
-
* @module postcss-load-config
|
|
8
|
-
* @version 2.1.0
|
|
9
|
-
*
|
|
10
|
-
* @requires comsiconfig
|
|
11
|
-
* @requires ./options
|
|
12
|
-
* @requires ./plugins
|
|
13
|
-
*/
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright Michael Ciniawsky <michael.ciniawsky@gmail.com>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"postcss-load-config","author":"Michael Ciniawky <michael.ciniawsky@gmail.com>","version":"6.0.1","funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"github","url":"https://github.com/sponsors/ai"}],"license":"MIT","types":"index.d.ts"}
|