vite 6.0.0-beta.1 → 6.0.0-beta.10
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/LICENSE.md +66 -1010
- package/README.md +4 -4
- package/bin/vite.js +5 -0
- package/client.d.ts +10 -0
- package/dist/client/client.mjs +344 -105
- package/dist/node/chunks/{dep-IQS-Za7F.js → dep-3RmXg9uo.js} +0 -8
- package/dist/node/chunks/{dep-DiM5uMHt.js → dep-Ck0pJQmh.js} +4 -175
- package/dist/node/chunks/{dep-BZ_CwQkz.js → dep-DiRA7B7B.js} +15738 -30463
- package/dist/node/chunks/{dep-D-7KCb9p.js → dep-DnSxfB-q.js} +704 -443
- package/dist/node/chunks/{dep-BZeeNeMJ.js → dep-ifLmJA8Z.js} +286 -127
- package/dist/node/cli.js +21 -37
- package/dist/node/constants.js +19 -11
- package/dist/node/index.d.ts +1649 -1602
- package/dist/node/index.js +13 -153
- package/dist/node/module-runner.d.ts +154 -141
- package/dist/node/module-runner.js +374 -221
- package/dist/node-cjs/publicUtils.cjs +363 -184
- package/index.cjs +35 -3
- package/index.d.cts +1 -1
- package/package.json +44 -33
- package/types/hmrPayload.d.ts +5 -0
- package/types/internal/cssPreprocessorOptions.d.ts +63 -0
- package/types/internal/lightningcssOptions.d.ts +18 -0
@@ -1,16 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { N as getDefaultExportFromCjs } from './dep-DiRA7B7B.js';
|
2
2
|
import require$$0 from 'path';
|
3
|
-
import
|
4
|
-
import { l as lib } from './dep-IQS-Za7F.js';
|
3
|
+
import { l as lib } from './dep-3RmXg9uo.js';
|
5
4
|
|
6
|
-
import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
|
7
|
-
import { dirname as __cjs_dirname } from 'node:path';
|
8
5
|
import { createRequire as __cjs_createRequire } from 'node:module';
|
9
6
|
|
10
|
-
const
|
11
|
-
const __dirname = __cjs_dirname(__filename);
|
12
|
-
const require = __cjs_createRequire(import.meta.url);
|
13
|
-
const __require = require;
|
7
|
+
const __require = __cjs_createRequire(import.meta.url);
|
14
8
|
function _mergeNamespaces(n, m) {
|
15
9
|
for (var i = 0; i < m.length; i++) {
|
16
10
|
var e = m[i];
|
@@ -190,160 +184,6 @@ var applyStyles$1 = function applyStyles(bundle, styles) {
|
|
190
184
|
});
|
191
185
|
};
|
192
186
|
|
193
|
-
var readCache$1 = {exports: {}};
|
194
|
-
|
195
|
-
var pify$2 = {exports: {}};
|
196
|
-
|
197
|
-
var processFn = function (fn, P, opts) {
|
198
|
-
return function () {
|
199
|
-
var that = this;
|
200
|
-
var args = new Array(arguments.length);
|
201
|
-
|
202
|
-
for (var i = 0; i < arguments.length; i++) {
|
203
|
-
args[i] = arguments[i];
|
204
|
-
}
|
205
|
-
|
206
|
-
return new P(function (resolve, reject) {
|
207
|
-
args.push(function (err, result) {
|
208
|
-
if (err) {
|
209
|
-
reject(err);
|
210
|
-
} else if (opts.multiArgs) {
|
211
|
-
var results = new Array(arguments.length - 1);
|
212
|
-
|
213
|
-
for (var i = 1; i < arguments.length; i++) {
|
214
|
-
results[i - 1] = arguments[i];
|
215
|
-
}
|
216
|
-
|
217
|
-
resolve(results);
|
218
|
-
} else {
|
219
|
-
resolve(result);
|
220
|
-
}
|
221
|
-
});
|
222
|
-
|
223
|
-
fn.apply(that, args);
|
224
|
-
});
|
225
|
-
};
|
226
|
-
};
|
227
|
-
|
228
|
-
var pify$1 = pify$2.exports = function (obj, P, opts) {
|
229
|
-
if (typeof P !== 'function') {
|
230
|
-
opts = P;
|
231
|
-
P = Promise;
|
232
|
-
}
|
233
|
-
|
234
|
-
opts = opts || {};
|
235
|
-
opts.exclude = opts.exclude || [/.+Sync$/];
|
236
|
-
|
237
|
-
var filter = function (key) {
|
238
|
-
var match = function (pattern) {
|
239
|
-
return typeof pattern === 'string' ? key === pattern : pattern.test(key);
|
240
|
-
};
|
241
|
-
|
242
|
-
return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
|
243
|
-
};
|
244
|
-
|
245
|
-
var ret = typeof obj === 'function' ? function () {
|
246
|
-
if (opts.excludeMain) {
|
247
|
-
return obj.apply(this, arguments);
|
248
|
-
}
|
249
|
-
|
250
|
-
return processFn(obj, P, opts).apply(this, arguments);
|
251
|
-
} : {};
|
252
|
-
|
253
|
-
return Object.keys(obj).reduce(function (ret, key) {
|
254
|
-
var x = obj[key];
|
255
|
-
|
256
|
-
ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
|
257
|
-
|
258
|
-
return ret;
|
259
|
-
}, ret);
|
260
|
-
};
|
261
|
-
|
262
|
-
pify$1.all = pify$1;
|
263
|
-
|
264
|
-
var pifyExports = pify$2.exports;
|
265
|
-
|
266
|
-
var fs = require$$0__default;
|
267
|
-
var path$3 = require$$0;
|
268
|
-
var pify = pifyExports;
|
269
|
-
|
270
|
-
var stat = pify(fs.stat);
|
271
|
-
var readFile = pify(fs.readFile);
|
272
|
-
var resolve = path$3.resolve;
|
273
|
-
|
274
|
-
var cache = Object.create(null);
|
275
|
-
|
276
|
-
function convert(content, encoding) {
|
277
|
-
if (Buffer.isEncoding(encoding)) {
|
278
|
-
return content.toString(encoding);
|
279
|
-
}
|
280
|
-
return content;
|
281
|
-
}
|
282
|
-
|
283
|
-
readCache$1.exports = function (path, encoding) {
|
284
|
-
path = resolve(path);
|
285
|
-
|
286
|
-
return stat(path).then(function (stats) {
|
287
|
-
var item = cache[path];
|
288
|
-
|
289
|
-
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
290
|
-
return convert(item.content, encoding);
|
291
|
-
}
|
292
|
-
|
293
|
-
return readFile(path).then(function (data) {
|
294
|
-
cache[path] = {
|
295
|
-
mtime: stats.mtime,
|
296
|
-
content: data
|
297
|
-
};
|
298
|
-
|
299
|
-
return convert(data, encoding);
|
300
|
-
});
|
301
|
-
}).catch(function (err) {
|
302
|
-
cache[path] = null;
|
303
|
-
return Promise.reject(err);
|
304
|
-
});
|
305
|
-
};
|
306
|
-
|
307
|
-
readCache$1.exports.sync = function (path, encoding) {
|
308
|
-
path = resolve(path);
|
309
|
-
|
310
|
-
try {
|
311
|
-
var stats = fs.statSync(path);
|
312
|
-
var item = cache[path];
|
313
|
-
|
314
|
-
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
315
|
-
return convert(item.content, encoding);
|
316
|
-
}
|
317
|
-
|
318
|
-
var data = fs.readFileSync(path);
|
319
|
-
|
320
|
-
cache[path] = {
|
321
|
-
mtime: stats.mtime,
|
322
|
-
content: data
|
323
|
-
};
|
324
|
-
|
325
|
-
return convert(data, encoding);
|
326
|
-
} catch (err) {
|
327
|
-
cache[path] = null;
|
328
|
-
throw err;
|
329
|
-
}
|
330
|
-
|
331
|
-
};
|
332
|
-
|
333
|
-
readCache$1.exports.get = function (path, encoding) {
|
334
|
-
path = resolve(path);
|
335
|
-
if (cache[path]) {
|
336
|
-
return convert(cache[path].content, encoding);
|
337
|
-
}
|
338
|
-
return null;
|
339
|
-
};
|
340
|
-
|
341
|
-
readCache$1.exports.clear = function () {
|
342
|
-
cache = Object.create(null);
|
343
|
-
};
|
344
|
-
|
345
|
-
var readCacheExports = readCache$1.exports;
|
346
|
-
|
347
187
|
const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
|
348
188
|
const base64DataURLRegexp = /^data:text\/css;base64,/i;
|
349
189
|
const plainDataURLRegexp = /^data:text\/css;plain,/i;
|
@@ -372,17 +212,6 @@ var dataUrl = {
|
|
372
212
|
contents,
|
373
213
|
};
|
374
214
|
|
375
|
-
const readCache = readCacheExports;
|
376
|
-
const dataURL$1 = dataUrl;
|
377
|
-
|
378
|
-
var loadContent$1 = function loadContent(filename) {
|
379
|
-
if (dataURL$1.isValid(filename)) {
|
380
|
-
return dataURL$1.contents(filename)
|
381
|
-
}
|
382
|
-
|
383
|
-
return readCache(filename, "utf-8")
|
384
|
-
};
|
385
|
-
|
386
215
|
// external tooling
|
387
216
|
const valueParser = lib;
|
388
217
|
|
@@ -920,7 +749,7 @@ const path = require$$0;
|
|
920
749
|
const applyConditions = applyConditions$1;
|
921
750
|
const applyRaws = applyRaws$1;
|
922
751
|
const applyStyles = applyStyles$1;
|
923
|
-
const loadContent =
|
752
|
+
const loadContent = () => "";
|
924
753
|
const parseStyles = parseStyles_1;
|
925
754
|
const resolveId = (id) => id;
|
926
755
|
|