vite 8.0.0-beta.1 → 8.0.0-beta.3
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/README.md +1 -1
- package/dist/client/client.mjs +4 -4
- package/dist/node/chunks/build2.js +787 -787
- package/dist/node/chunks/lib.js +7 -7
- package/dist/node/chunks/node.js +4220 -4131
- package/dist/node/chunks/postcss-import.js +15 -15
- package/dist/node/index.d.ts +22 -5
- package/package.json +10 -10
|
@@ -3,7 +3,7 @@ import { t as require_lib } from "./lib.js";
|
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js
|
|
5
5
|
var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
|
-
module.exports = function formatImportPrelude
|
|
6
|
+
module.exports = function formatImportPrelude(layer, media, supports) {
|
|
7
7
|
const parts = [];
|
|
8
8
|
if (typeof layer !== "undefined") {
|
|
9
9
|
let layerParams = "layer";
|
|
@@ -19,13 +19,13 @@ var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/base64-encoded-import.js
|
|
21
21
|
var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
22
|
-
const formatImportPrelude
|
|
23
|
-
module.exports = function base64EncodedConditionalImport
|
|
22
|
+
const formatImportPrelude = require_format_import_prelude();
|
|
23
|
+
module.exports = function base64EncodedConditionalImport(prelude, conditions) {
|
|
24
24
|
if (!conditions?.length) return prelude;
|
|
25
25
|
conditions.reverse();
|
|
26
26
|
const first = conditions.pop();
|
|
27
|
-
let params = `${prelude} ${formatImportPrelude
|
|
28
|
-
for (const condition of conditions) params = `'data:text/css;base64,${Buffer.from(`@import ${params}`).toString("base64")}' ${formatImportPrelude
|
|
27
|
+
let params = `${prelude} ${formatImportPrelude(first.layer, first.media, first.supports)}`;
|
|
28
|
+
for (const condition of conditions) params = `'data:text/css;base64,${Buffer.from(`@import ${params}`).toString("base64")}' ${formatImportPrelude(condition.layer, condition.media, condition.supports)}`;
|
|
29
29
|
return params;
|
|
30
30
|
};
|
|
31
31
|
}));
|
|
@@ -34,7 +34,7 @@ var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
34
34
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-conditions.js
|
|
35
35
|
var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
36
36
|
const base64EncodedConditionalImport = require_base64_encoded_import();
|
|
37
|
-
module.exports = function applyConditions
|
|
37
|
+
module.exports = function applyConditions(bundle, atRule) {
|
|
38
38
|
const firstImportStatementIndex = bundle.findIndex((stmt) => stmt.type === "import");
|
|
39
39
|
const lastImportStatementIndex = bundle.findLastIndex((stmt) => stmt.type === "import");
|
|
40
40
|
bundle.forEach((stmt, index) => {
|
|
@@ -109,7 +109,7 @@ var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-raws.js
|
|
111
111
|
var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
112
|
-
module.exports = function applyRaws
|
|
112
|
+
module.exports = function applyRaws(bundle) {
|
|
113
113
|
bundle.forEach((stmt, index) => {
|
|
114
114
|
if (index === 0) return;
|
|
115
115
|
if (stmt.parent) {
|
|
@@ -124,7 +124,7 @@ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
124
124
|
//#endregion
|
|
125
125
|
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-styles.js
|
|
126
126
|
var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
127
|
-
module.exports = function applyStyles
|
|
127
|
+
module.exports = function applyStyles(bundle, styles) {
|
|
128
128
|
styles.nodes = [];
|
|
129
129
|
bundle.forEach((stmt) => {
|
|
130
130
|
if ([
|
|
@@ -167,7 +167,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
167
167
|
var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
168
168
|
const valueParser = require_lib();
|
|
169
169
|
const { stringify } = valueParser;
|
|
170
|
-
module.exports = function parseStatements
|
|
170
|
+
module.exports = function parseStatements(result, styles, conditions, from) {
|
|
171
171
|
const statements = [];
|
|
172
172
|
let nodes = [];
|
|
173
173
|
let encounteredNonImportNodes = false;
|
|
@@ -293,7 +293,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
293
293
|
var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
294
294
|
const path$2 = __require("path");
|
|
295
295
|
let sugarss;
|
|
296
|
-
module.exports = function processContent
|
|
296
|
+
module.exports = function processContent(result, content, filename, options, postcss) {
|
|
297
297
|
const { plugins } = options;
|
|
298
298
|
const ext = path$2.extname(filename);
|
|
299
299
|
const parserList = [];
|
|
@@ -330,9 +330,9 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
330
330
|
const dataURL = require_data_url();
|
|
331
331
|
const parseStatements = require_parse_statements();
|
|
332
332
|
const processContent = require_process_content();
|
|
333
|
-
const resolveId
|
|
333
|
+
const resolveId = (id) => id;
|
|
334
334
|
const formatImportPrelude = require_format_import_prelude();
|
|
335
|
-
async function parseStyles
|
|
335
|
+
async function parseStyles(result, styles, options, state, conditions, from, postcss) {
|
|
336
336
|
const statements = parseStatements(result, styles, conditions, from);
|
|
337
337
|
for (const stmt of statements) {
|
|
338
338
|
if (stmt.type !== "import" || !isProcessableURL(stmt.uri)) continue;
|
|
@@ -374,7 +374,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
374
374
|
const base = sourceFile ? path$1.dirname(atRule.source.input.file) : options.root;
|
|
375
375
|
const paths = [await options.resolve(stmt.uri, base, options, atRule)].flat();
|
|
376
376
|
const resolved = await Promise.all(paths.map((file) => {
|
|
377
|
-
return !path$1.isAbsolute(file) ? resolveId
|
|
377
|
+
return !path$1.isAbsolute(file) ? resolveId(file, base, options, atRule) : file;
|
|
378
378
|
}));
|
|
379
379
|
resolved.forEach((file) => {
|
|
380
380
|
result.messages.push({
|
|
@@ -415,7 +415,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
415
415
|
state.hashFiles[content][stmtDuplicateCheckKey] = true;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
return parseStyles
|
|
418
|
+
return parseStyles(result, styles, options, state, conditions, [...from, filename], postcss);
|
|
419
419
|
}
|
|
420
420
|
function isProcessableURL(uri) {
|
|
421
421
|
if (/^(?:[a-z]+:)?\/\//i.test(uri)) return false;
|
|
@@ -424,7 +424,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
424
424
|
} catch {}
|
|
425
425
|
return true;
|
|
426
426
|
}
|
|
427
|
-
module.exports = parseStyles
|
|
427
|
+
module.exports = parseStyles;
|
|
428
428
|
}));
|
|
429
429
|
|
|
430
430
|
//#endregion
|
package/dist/node/index.d.ts
CHANGED
|
@@ -320,7 +320,7 @@ declare namespace Connect {
|
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
//#endregion
|
|
323
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.
|
|
323
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.23.2_patch_hash=d89dff5a0afc2cb277080ad056a3baf7feeeeac19144878abc17f4c91ad89095_ms@2.1.3/node_modules/http-proxy-3/dist/lib/http-proxy/index.d.ts
|
|
324
324
|
interface ProxyTargetDetailed {
|
|
325
325
|
host: string;
|
|
326
326
|
port: number;
|
|
@@ -407,6 +407,22 @@ interface ServerOptions$3 {
|
|
|
407
407
|
* This is passed to https.request.
|
|
408
408
|
*/
|
|
409
409
|
ca?: string;
|
|
410
|
+
/** Optional fetch implementation to use instead of global fetch, use this to activate fetch-based proxying,
|
|
411
|
+
* for example to proxy HTTP/2 requests
|
|
412
|
+
*/
|
|
413
|
+
fetch?: typeof fetch;
|
|
414
|
+
/** Optional configuration object for fetch-based proxy requests.
|
|
415
|
+
* Use this to customize fetch request and response handling.
|
|
416
|
+
* For custom fetch implementations, use the `fetch` property.*/
|
|
417
|
+
fetchOptions?: FetchOptions;
|
|
418
|
+
}
|
|
419
|
+
interface FetchOptions {
|
|
420
|
+
/** Fetch request options */
|
|
421
|
+
requestOptions?: RequestInit;
|
|
422
|
+
/** Called before making the fetch request */
|
|
423
|
+
onBeforeRequest?: (requestOptions: RequestInit, req: http.IncomingMessage, res: http.ServerResponse, options: NormalizedServerOptions) => void | Promise<void>;
|
|
424
|
+
/** Called after receiving the fetch response */
|
|
425
|
+
onAfterResponse?: (response: Response, req: http.IncomingMessage, res: http.ServerResponse, options: NormalizedServerOptions) => void | Promise<void>;
|
|
410
426
|
}
|
|
411
427
|
interface NormalizedServerOptions extends ServerOptions$3 {
|
|
412
428
|
target?: NormalizeProxyTarget<ProxyTarget>;
|
|
@@ -492,7 +508,7 @@ declare class ProxyServer<TIncomingMessage extends typeof http.IncomingMessage =
|
|
|
492
508
|
after: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions<TIncomingMessage, TServerResponse, TError>[PT]) => void;
|
|
493
509
|
}
|
|
494
510
|
//#endregion
|
|
495
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.
|
|
511
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.23.2_patch_hash=d89dff5a0afc2cb277080ad056a3baf7feeeeac19144878abc17f4c91ad89095_ms@2.1.3/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.d.ts
|
|
496
512
|
declare function numOpenSockets(): number;
|
|
497
513
|
declare namespace index_d_exports {
|
|
498
514
|
export { ErrorCallback, ProxyServer, ProxyTarget, ProxyTargetUrl, ServerOptions$3 as ServerOptions, createProxyServer as createProxy, createProxyServer, createProxyServer as createServer, ProxyServer as default, numOpenSockets };
|
|
@@ -3490,12 +3506,13 @@ interface ExperimentalOptions {
|
|
|
3490
3506
|
*
|
|
3491
3507
|
* - 'resolver' (deprecated, will be removed in v8 stable): Enable only the native resolver plugin.
|
|
3492
3508
|
* - 'v1' (will be deprecated, will be removed in v8 stable): Enable the first stable set of native plugins (including resolver).
|
|
3493
|
-
* -
|
|
3509
|
+
* - 'v2' (will be deprecated, will be removed in v8 stable): Enable the improved dynamicImportVarsPlugin and importGlobPlugin.
|
|
3510
|
+
* - true: Enable all native plugins (currently an alias of 'v2', it will map to a newer one in the future versions).
|
|
3494
3511
|
*
|
|
3495
3512
|
* @experimental
|
|
3496
|
-
* @default '
|
|
3513
|
+
* @default 'v2'
|
|
3497
3514
|
*/
|
|
3498
|
-
enableNativePlugin?: boolean | "resolver" | "v1";
|
|
3515
|
+
enableNativePlugin?: boolean | "resolver" | "v1" | "v2";
|
|
3499
3516
|
/**
|
|
3500
3517
|
* Enable full bundle mode.
|
|
3501
3518
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"funding": "https://github.com/vitejs/vite?sponsor=1",
|
|
61
61
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@oxc-project/runtime": "0.
|
|
63
|
+
"@oxc-project/runtime": "0.103.0",
|
|
64
64
|
"fdir": "^6.5.0",
|
|
65
65
|
"lightningcss": "^1.30.2",
|
|
66
66
|
"picomatch": "^4.0.3",
|
|
67
67
|
"postcss": "^8.5.6",
|
|
68
|
-
"rolldown": "1.0.0-beta.
|
|
68
|
+
"rolldown": "1.0.0-beta.55",
|
|
69
69
|
"tinyglobby": "^0.2.15"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"@babel/parser": "^7.28.5",
|
|
76
76
|
"@jridgewell/remapping": "^2.3.5",
|
|
77
77
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
78
|
-
"@oxc-project/types": "0.
|
|
78
|
+
"@oxc-project/types": "0.103.0",
|
|
79
79
|
"@polka/compression": "^1.0.0-next.25",
|
|
80
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
|
80
|
+
"@rolldown/pluginutils": "1.0.0-beta.55",
|
|
81
81
|
"@rollup/plugin-alias": "^5.1.1",
|
|
82
82
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
83
83
|
"@rollup/plugin-dynamic-import-vars": "2.1.4",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@types/escape-html": "^1.0.4",
|
|
86
86
|
"@types/pnpapi": "^0.0.5",
|
|
87
87
|
"artichokie": "^0.4.2",
|
|
88
|
-
"baseline-browser-mapping": "^2.
|
|
88
|
+
"baseline-browser-mapping": "^2.9.7",
|
|
89
89
|
"cac": "^6.7.14",
|
|
90
90
|
"chokidar": "^3.6.0",
|
|
91
91
|
"connect": "^3.7.0",
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"estree-walker": "^3.0.3",
|
|
102
102
|
"etag": "^1.8.1",
|
|
103
103
|
"host-validation-middleware": "^0.1.2",
|
|
104
|
-
"http-proxy-3": "^1.
|
|
105
|
-
"launch-editor-middleware": "^2.
|
|
104
|
+
"http-proxy-3": "^1.23.2",
|
|
105
|
+
"launch-editor-middleware": "^2.12.0",
|
|
106
106
|
"magic-string": "^0.30.21",
|
|
107
107
|
"mlly": "^1.8.0",
|
|
108
108
|
"mrmime": "^2.0.1",
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
"rolldown-plugin-dts": "^0.18.3",
|
|
121
121
|
"rollup": "^4.43.0",
|
|
122
122
|
"rollup-plugin-license": "^3.6.0",
|
|
123
|
-
"sass": "^1.
|
|
124
|
-
"sass-embedded": "^1.
|
|
123
|
+
"sass": "^1.96.0",
|
|
124
|
+
"sass-embedded": "^1.96.0",
|
|
125
125
|
"sirv": "^3.0.2",
|
|
126
126
|
"strip-literal": "^3.1.0",
|
|
127
127
|
"terser": "^5.44.1",
|