vite 7.1.2 → 7.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/LICENSE.md +1 -1
- package/bin/vite.js +3 -3
- package/dist/node/chunks/{dep-BDbL9e7d.js → dep-BHlaQtHS.js} +2 -3
- package/dist/node/chunks/{dep-CTf3zVuV.js → dep-BkmSwcUW.js} +2 -3
- package/dist/node/chunks/{dep-f94b-k0u.js → dep-BuoK8Wda.js} +1 -2
- package/dist/node/chunks/{dep-CMEinpL-.js → dep-C6pp_iVS.js} +526 -553
- package/dist/node/chunks/{dep-Du_AlPMa.js → dep-DCVhRpiz.js} +12 -13
- package/dist/node/chunks/{dep-zLyvzoxR.js → dep-DDbTn5rw.js} +6 -7
- package/dist/node/chunks/dep-DMXKBGET.js +4 -0
- package/dist/node/chunks/dep-DPV9_aqi.js +4 -0
- package/dist/node/chunks/dep-SmwnYDP9.js +320 -0
- package/dist/node/chunks/{dep-Drtntmtt.js → dep-lCKrEJQm.js} +2 -2
- package/dist/node/chunks/{dep-V5uAjiuB.js → dep-sDKrrA4S.js} +0 -1
- package/dist/node/chunks/dep-t6m959kc.js +4 -0
- package/dist/node/cli.js +18 -11
- package/dist/node/index.d.ts +28 -28
- package/dist/node/index.js +2 -3
- package/package.json +15 -15
- package/dist/node/chunks/dep-BDCsDwBr.js +0 -151
- package/dist/node/chunks/dep-CtUaBn5f.js +0 -5
- package/dist/node/chunks/dep-DZ4iRZu_.js +0 -5
- package/dist/node/constants.js +0 -4
package/dist/node/index.d.ts
CHANGED
@@ -322,7 +322,7 @@ declare namespace Connect {
|
|
322
322
|
}
|
323
323
|
}
|
324
324
|
//#endregion
|
325
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.
|
325
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/index.d.ts
|
326
326
|
interface ProxyTargetDetailed {
|
327
327
|
host: string;
|
328
328
|
port: number;
|
@@ -414,27 +414,27 @@ interface NormalizedServerOptions extends ServerOptions$3 {
|
|
414
414
|
target?: NormalizeProxyTarget<ProxyTarget>;
|
415
415
|
forward?: NormalizeProxyTarget<ProxyTargetUrl>;
|
416
416
|
}
|
417
|
-
type ErrorCallback = (err:
|
418
|
-
type ProxyServerEventMap = {
|
419
|
-
error: Parameters<ErrorCallback
|
420
|
-
start: [req:
|
417
|
+
type ErrorCallback<TIncomingMessage extends typeof http.IncomingMessage = typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse = typeof http.ServerResponse, TError = Error> = (err: TError, req: InstanceType<TIncomingMessage>, res: InstanceType<TServerResponse> | net.Socket, target?: ProxyTargetUrl) => void;
|
418
|
+
type ProxyServerEventMap<TIncomingMessage extends typeof http.IncomingMessage = typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse = typeof http.ServerResponse, TError = Error> = {
|
419
|
+
error: Parameters<ErrorCallback<TIncomingMessage, TServerResponse, TError>>;
|
420
|
+
start: [req: InstanceType<TIncomingMessage>, res: InstanceType<TServerResponse>, target: ProxyTargetUrl];
|
421
421
|
open: [socket: net.Socket];
|
422
|
-
proxyReq: [proxyReq: http.ClientRequest, req:
|
423
|
-
proxyRes: [proxyRes:
|
424
|
-
proxyReqWs: [proxyReq: http.ClientRequest, req:
|
425
|
-
econnreset: [err: Error, req:
|
426
|
-
end: [req:
|
427
|
-
close: [proxyRes:
|
422
|
+
proxyReq: [proxyReq: http.ClientRequest, req: InstanceType<TIncomingMessage>, res: InstanceType<TServerResponse>, options: ServerOptions$3, socket: net.Socket];
|
423
|
+
proxyRes: [proxyRes: InstanceType<TIncomingMessage>, req: InstanceType<TIncomingMessage>, res: InstanceType<TServerResponse>];
|
424
|
+
proxyReqWs: [proxyReq: http.ClientRequest, req: InstanceType<TIncomingMessage>, socket: net.Socket, options: ServerOptions$3, head: any];
|
425
|
+
econnreset: [err: Error, req: InstanceType<TIncomingMessage>, res: InstanceType<TServerResponse>, target: ProxyTargetUrl];
|
426
|
+
end: [req: InstanceType<TIncomingMessage>, res: InstanceType<TServerResponse>, proxyRes: InstanceType<TIncomingMessage>];
|
427
|
+
close: [proxyRes: InstanceType<TIncomingMessage>, proxySocket: net.Socket, proxyHead: any];
|
428
428
|
};
|
429
|
-
type ProxyMethodArgs = {
|
430
|
-
ws: [req:
|
431
|
-
web: [req:
|
429
|
+
type ProxyMethodArgs<TIncomingMessage extends typeof http.IncomingMessage = typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse = typeof http.ServerResponse, TError = Error> = {
|
430
|
+
ws: [req: InstanceType<TIncomingMessage>, socket: any, head: any, ...args: [options?: ServerOptions$3, callback?: ErrorCallback<TIncomingMessage, TServerResponse, TError>] | [callback?: ErrorCallback<TIncomingMessage, TServerResponse, TError>]];
|
431
|
+
web: [req: InstanceType<TIncomingMessage>, res: InstanceType<TServerResponse>, ...args: [options: ServerOptions$3, callback?: ErrorCallback<TIncomingMessage, TServerResponse, TError>] | [callback?: ErrorCallback<TIncomingMessage, TServerResponse, TError>]];
|
432
432
|
};
|
433
|
-
type PassFunctions = {
|
434
|
-
ws: (req:
|
435
|
-
web: (req:
|
433
|
+
type PassFunctions<TIncomingMessage extends typeof http.IncomingMessage = typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse = typeof http.ServerResponse, TError = Error> = {
|
434
|
+
ws: (req: InstanceType<TIncomingMessage>, socket: net.Socket, options: NormalizedServerOptions, head: Buffer | undefined, server: ProxyServer<TIncomingMessage, TServerResponse, TError>, cb?: ErrorCallback<TIncomingMessage, TServerResponse, TError>) => unknown;
|
435
|
+
web: (req: InstanceType<TIncomingMessage>, res: InstanceType<TServerResponse>, options: NormalizedServerOptions, head: Buffer | undefined, server: ProxyServer<TIncomingMessage, TServerResponse, TError>, cb?: ErrorCallback<TIncomingMessage, TServerResponse, TError>) => unknown;
|
436
436
|
};
|
437
|
-
declare class ProxyServer extends EventEmitter<ProxyServerEventMap
|
437
|
+
declare class ProxyServer<TIncomingMessage extends typeof http.IncomingMessage = typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse = typeof http.ServerResponse, TError = Error> extends EventEmitter<ProxyServerEventMap<TIncomingMessage, TServerResponse, TError>> {
|
438
438
|
/**
|
439
439
|
* Used for proxying WS(S) requests
|
440
440
|
* @param req - Client request.
|
@@ -442,14 +442,14 @@ declare class ProxyServer extends EventEmitter<ProxyServerEventMap> {
|
|
442
442
|
* @param head - Client head.
|
443
443
|
* @param options - Additional options.
|
444
444
|
*/
|
445
|
-
readonly ws: (...args: ProxyMethodArgs["ws"]) => void;
|
445
|
+
readonly ws: (...args: ProxyMethodArgs<TIncomingMessage, TServerResponse, TError>["ws"]) => void;
|
446
446
|
/**
|
447
447
|
* Used for proxying regular HTTP(S) requests
|
448
448
|
* @param req - Client request.
|
449
449
|
* @param res - Client response.
|
450
450
|
* @param options - Additional options.
|
451
451
|
*/
|
452
|
-
readonly web: (...args: ProxyMethodArgs["web"]) => void;
|
452
|
+
readonly web: (...args: ProxyMethodArgs<TIncomingMessage, TServerResponse, TError>["web"]) => void;
|
453
453
|
private options;
|
454
454
|
private webPasses;
|
455
455
|
private wsPasses;
|
@@ -464,21 +464,21 @@ declare class ProxyServer extends EventEmitter<ProxyServerEventMap> {
|
|
464
464
|
* @param options Config object passed to the proxy
|
465
465
|
* @returns Proxy object with handlers for `ws` and `web` requests
|
466
466
|
*/
|
467
|
-
static createProxyServer(options?: ServerOptions$3): ProxyServer
|
467
|
+
static createProxyServer<TIncomingMessage extends typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse, TError = Error>(options?: ServerOptions$3): ProxyServer<TIncomingMessage, TServerResponse, TError>;
|
468
468
|
/**
|
469
469
|
* Creates the proxy server with specified options.
|
470
470
|
* @param options Config object passed to the proxy
|
471
471
|
* @returns Proxy object with handlers for `ws` and `web` requests
|
472
472
|
*/
|
473
|
-
static createServer(options?: ServerOptions$3): ProxyServer
|
473
|
+
static createServer<TIncomingMessage extends typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse, TError = Error>(options?: ServerOptions$3): ProxyServer<TIncomingMessage, TServerResponse, TError>;
|
474
474
|
/**
|
475
475
|
* Creates the proxy server with specified options.
|
476
476
|
* @param options Config object passed to the proxy
|
477
477
|
* @returns Proxy object with handlers for `ws` and `web` requests
|
478
478
|
*/
|
479
|
-
static createProxy(options?: ServerOptions$3): ProxyServer
|
479
|
+
static createProxy<TIncomingMessage extends typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse, TError = Error>(options?: ServerOptions$3): ProxyServer<TIncomingMessage, TServerResponse, TError>;
|
480
480
|
createRightProxy: <PT extends ProxyType>(type: PT) => Function;
|
481
|
-
onError: (err:
|
481
|
+
onError: (err: TError) => void;
|
482
482
|
/**
|
483
483
|
* A function that wraps the object in a webserver, for your convenience
|
484
484
|
* @param port - Port to listen on
|
@@ -490,11 +490,11 @@ declare class ProxyServer extends EventEmitter<ProxyServerEventMap> {
|
|
490
490
|
* A function that closes the inner webserver and stops listening on given port
|
491
491
|
*/
|
492
492
|
close: (cb?: Function) => void;
|
493
|
-
before: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions[PT]) => void;
|
494
|
-
after: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions[PT]) => void;
|
493
|
+
before: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions<TIncomingMessage, TServerResponse, TError>[PT]) => void;
|
494
|
+
after: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions<TIncomingMessage, TServerResponse, TError>[PT]) => void;
|
495
495
|
}
|
496
496
|
//#endregion
|
497
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.
|
497
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.d.ts
|
498
498
|
declare function numOpenSockets(): number;
|
499
499
|
declare namespace index_d_exports {
|
500
500
|
export { ErrorCallback, ProxyServer, ProxyTarget, ProxyTargetUrl, ServerOptions$3 as ServerOptions, createProxyServer as createProxy, createProxyServer, createProxyServer as createServer, ProxyServer as default, numOpenSockets };
|
@@ -513,7 +513,7 @@ declare namespace index_d_exports {
|
|
513
513
|
*
|
514
514
|
* @api public
|
515
515
|
*/
|
516
|
-
declare function createProxyServer(options?: ServerOptions$3): ProxyServer
|
516
|
+
declare function createProxyServer<TIncomingMessage extends typeof http.IncomingMessage = typeof http.IncomingMessage, TServerResponse extends typeof http.ServerResponse = typeof http.ServerResponse, TError = Error>(options?: ServerOptions$3): ProxyServer<TIncomingMessage, TServerResponse, TError>;
|
517
517
|
//#endregion
|
518
518
|
//#region src/node/server/middlewares/proxy.d.ts
|
519
519
|
interface ProxyOptions extends ServerOptions$3 {
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver,
|
3
|
-
import { DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, VERSION, defaultAllowedOrigins } from "./chunks/dep-BDCsDwBr.js";
|
1
|
+
import { DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, VERSION, createLogger, defaultAllowedOrigins } from "./chunks/dep-SmwnYDP9.js";
|
2
|
+
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-C6pp_iVS.js";
|
4
3
|
import { parseAst, parseAstAsync } from "rollup/parseAst";
|
5
4
|
import { version as esbuildVersion } from "esbuild";
|
6
5
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "7.1.
|
3
|
+
"version": "7.1.4",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -69,7 +69,7 @@
|
|
69
69
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
70
70
|
"dependencies": {
|
71
71
|
"esbuild": "^0.25.0",
|
72
|
-
"fdir": "^6.
|
72
|
+
"fdir": "^6.5.0",
|
73
73
|
"picomatch": "^4.0.3",
|
74
74
|
"postcss": "^8.5.6",
|
75
75
|
"rollup": "^4.43.0",
|
@@ -79,20 +79,20 @@
|
|
79
79
|
"fsevents": "~2.3.3"
|
80
80
|
},
|
81
81
|
"devDependencies": {
|
82
|
-
"@babel/parser": "^7.28.
|
83
|
-
"@jridgewell/remapping": "^2.3.
|
84
|
-
"@jridgewell/trace-mapping": "^0.3.
|
85
|
-
"@oxc-project/types": "0.
|
82
|
+
"@babel/parser": "^7.28.3",
|
83
|
+
"@jridgewell/remapping": "^2.3.5",
|
84
|
+
"@jridgewell/trace-mapping": "^0.3.30",
|
85
|
+
"@oxc-project/types": "0.81.0",
|
86
86
|
"@polka/compression": "^1.0.0-next.25",
|
87
|
-
"@rolldown/pluginutils": "^1.0.0-beta.
|
87
|
+
"@rolldown/pluginutils": "^1.0.0-beta.34",
|
88
88
|
"@rollup/plugin-alias": "^5.1.1",
|
89
89
|
"@rollup/plugin-commonjs": "^28.0.6",
|
90
90
|
"@rollup/plugin-dynamic-import-vars": "2.1.4",
|
91
91
|
"@rollup/pluginutils": "^5.2.0",
|
92
92
|
"@types/escape-html": "^1.0.4",
|
93
93
|
"@types/pnpapi": "^0.0.5",
|
94
|
-
"artichokie": "^0.
|
95
|
-
"baseline-browser-mapping": "^2.
|
94
|
+
"artichokie": "^0.4.0",
|
95
|
+
"baseline-browser-mapping": "^2.7.2",
|
96
96
|
"cac": "^6.7.14",
|
97
97
|
"chokidar": "^3.6.0",
|
98
98
|
"connect": "^3.7.0",
|
@@ -108,11 +108,11 @@
|
|
108
108
|
"estree-walker": "^3.0.3",
|
109
109
|
"etag": "^1.8.1",
|
110
110
|
"host-validation-middleware": "^0.1.1",
|
111
|
-
"http-proxy-3": "^1.
|
111
|
+
"http-proxy-3": "^1.21.0",
|
112
112
|
"launch-editor-middleware": "^2.11.1",
|
113
113
|
"lightningcss": "^1.30.1",
|
114
|
-
"magic-string": "^0.30.
|
115
|
-
"mlly": "^1.
|
114
|
+
"magic-string": "^0.30.18",
|
115
|
+
"mlly": "^1.8.0",
|
116
116
|
"mrmime": "^2.0.1",
|
117
117
|
"nanoid": "^5.1.5",
|
118
118
|
"open": "^10.2.0",
|
@@ -125,11 +125,11 @@
|
|
125
125
|
"postcss-modules": "^6.0.1",
|
126
126
|
"premove": "^4.0.0",
|
127
127
|
"resolve.exports": "^2.0.3",
|
128
|
-
"rolldown": "^1.0.0-beta.
|
128
|
+
"rolldown": "^1.0.0-beta.32",
|
129
129
|
"rolldown-plugin-dts": "^0.15.6",
|
130
130
|
"rollup-plugin-license": "^3.6.0",
|
131
|
-
"sass": "^1.
|
132
|
-
"sass-embedded": "^1.
|
131
|
+
"sass": "^1.91.0",
|
132
|
+
"sass-embedded": "^1.91.0",
|
133
133
|
"sirv": "^3.0.1",
|
134
134
|
"strip-literal": "^3.0.0",
|
135
135
|
"terser": "^5.43.1",
|
@@ -1,151 +0,0 @@
|
|
1
|
-
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { readFileSync } from "node:fs";
|
3
|
-
import path, { resolve } from "node:path";
|
4
|
-
import { fileURLToPath } from "node:url";
|
5
|
-
|
6
|
-
//#region src/node/constants.ts
|
7
|
-
const { version } = JSON.parse(readFileSync(new URL("../../package.json", new URL("../../../src/node/constants.ts", import.meta.url))).toString());
|
8
|
-
const ROLLUP_HOOKS = [
|
9
|
-
"options",
|
10
|
-
"buildStart",
|
11
|
-
"buildEnd",
|
12
|
-
"renderStart",
|
13
|
-
"renderError",
|
14
|
-
"renderChunk",
|
15
|
-
"writeBundle",
|
16
|
-
"generateBundle",
|
17
|
-
"banner",
|
18
|
-
"footer",
|
19
|
-
"augmentChunkHash",
|
20
|
-
"outputOptions",
|
21
|
-
"renderDynamicImport",
|
22
|
-
"resolveFileUrl",
|
23
|
-
"resolveImportMeta",
|
24
|
-
"intro",
|
25
|
-
"outro",
|
26
|
-
"closeBundle",
|
27
|
-
"closeWatcher",
|
28
|
-
"load",
|
29
|
-
"moduleParsed",
|
30
|
-
"watchChange",
|
31
|
-
"resolveDynamicImport",
|
32
|
-
"resolveId",
|
33
|
-
"shouldTransformCachedModule",
|
34
|
-
"transform",
|
35
|
-
"onLog"
|
36
|
-
];
|
37
|
-
const VERSION = version;
|
38
|
-
const DEFAULT_MAIN_FIELDS = [
|
39
|
-
"browser",
|
40
|
-
"module",
|
41
|
-
"jsnext:main",
|
42
|
-
"jsnext"
|
43
|
-
];
|
44
|
-
const DEFAULT_CLIENT_MAIN_FIELDS = Object.freeze(DEFAULT_MAIN_FIELDS);
|
45
|
-
const DEFAULT_SERVER_MAIN_FIELDS = Object.freeze(DEFAULT_MAIN_FIELDS.filter((f) => f !== "browser"));
|
46
|
-
/**
|
47
|
-
* A special condition that would be replaced with production or development
|
48
|
-
* depending on NODE_ENV env variable
|
49
|
-
*/
|
50
|
-
const DEV_PROD_CONDITION = `development|production`;
|
51
|
-
const DEFAULT_CONDITIONS = [
|
52
|
-
"module",
|
53
|
-
"browser",
|
54
|
-
"node",
|
55
|
-
DEV_PROD_CONDITION
|
56
|
-
];
|
57
|
-
const DEFAULT_CLIENT_CONDITIONS = Object.freeze(DEFAULT_CONDITIONS.filter((c) => c !== "node"));
|
58
|
-
const DEFAULT_SERVER_CONDITIONS = Object.freeze(DEFAULT_CONDITIONS.filter((c) => c !== "browser"));
|
59
|
-
const DEFAULT_EXTERNAL_CONDITIONS = Object.freeze(["node", "module-sync"]);
|
60
|
-
/**
|
61
|
-
* The browser versions that are included in the Baseline Widely Available on 2025-05-01.
|
62
|
-
*
|
63
|
-
* This value would be bumped on each major release of Vite.
|
64
|
-
*
|
65
|
-
* The value is generated by `pnpm generate-target` script.
|
66
|
-
*/
|
67
|
-
const ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET = [
|
68
|
-
"chrome107",
|
69
|
-
"edge107",
|
70
|
-
"firefox104",
|
71
|
-
"safari16"
|
72
|
-
];
|
73
|
-
const DEFAULT_CONFIG_FILES = [
|
74
|
-
"vite.config.js",
|
75
|
-
"vite.config.mjs",
|
76
|
-
"vite.config.ts",
|
77
|
-
"vite.config.cjs",
|
78
|
-
"vite.config.mts",
|
79
|
-
"vite.config.cts"
|
80
|
-
];
|
81
|
-
const JS_TYPES_RE = /\.(?:j|t)sx?$|\.mjs$/;
|
82
|
-
const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
|
83
|
-
const OPTIMIZABLE_ENTRY_RE = /\.[cm]?[jt]s$/;
|
84
|
-
const SPECIAL_QUERY_RE = /[?&](?:worker|sharedworker|raw|url)\b/;
|
85
|
-
/**
|
86
|
-
* Prefix for resolved fs paths, since windows paths may not be valid as URLs.
|
87
|
-
*/
|
88
|
-
const FS_PREFIX = `/@fs/`;
|
89
|
-
const CLIENT_PUBLIC_PATH = `/@vite/client`;
|
90
|
-
const ENV_PUBLIC_PATH = `/@vite/env`;
|
91
|
-
const VITE_PACKAGE_DIR = resolve(fileURLToPath(new URL("../../../src/node/constants.ts", import.meta.url)), "../../..");
|
92
|
-
const CLIENT_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/client.mjs");
|
93
|
-
const ENV_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/env.mjs");
|
94
|
-
const CLIENT_DIR = path.dirname(CLIENT_ENTRY);
|
95
|
-
const KNOWN_ASSET_TYPES = [
|
96
|
-
"apng",
|
97
|
-
"bmp",
|
98
|
-
"png",
|
99
|
-
"jpe?g",
|
100
|
-
"jfif",
|
101
|
-
"pjpeg",
|
102
|
-
"pjp",
|
103
|
-
"gif",
|
104
|
-
"svg",
|
105
|
-
"ico",
|
106
|
-
"webp",
|
107
|
-
"avif",
|
108
|
-
"cur",
|
109
|
-
"jxl",
|
110
|
-
"mp4",
|
111
|
-
"webm",
|
112
|
-
"ogg",
|
113
|
-
"mp3",
|
114
|
-
"wav",
|
115
|
-
"flac",
|
116
|
-
"aac",
|
117
|
-
"opus",
|
118
|
-
"mov",
|
119
|
-
"m4a",
|
120
|
-
"vtt",
|
121
|
-
"woff2?",
|
122
|
-
"eot",
|
123
|
-
"ttf",
|
124
|
-
"otf",
|
125
|
-
"webmanifest",
|
126
|
-
"pdf",
|
127
|
-
"txt"
|
128
|
-
];
|
129
|
-
const DEFAULT_ASSETS_RE = new RegExp(`\\.(` + KNOWN_ASSET_TYPES.join("|") + `)(\\?.*)?$`, "i");
|
130
|
-
const DEP_VERSION_RE = /[?&](v=[\w.-]+)\b/;
|
131
|
-
const loopbackHosts = new Set([
|
132
|
-
"localhost",
|
133
|
-
"127.0.0.1",
|
134
|
-
"::1",
|
135
|
-
"0000:0000:0000:0000:0000:0000:0000:0001"
|
136
|
-
]);
|
137
|
-
const wildcardHosts = new Set([
|
138
|
-
"0.0.0.0",
|
139
|
-
"::",
|
140
|
-
"0000:0000:0000:0000:0000:0000:0000:0000"
|
141
|
-
]);
|
142
|
-
const DEFAULT_DEV_PORT = 5173;
|
143
|
-
const DEFAULT_PREVIEW_PORT = 4173;
|
144
|
-
const DEFAULT_ASSETS_INLINE_LIMIT = 4096;
|
145
|
-
const defaultAllowedOrigins = /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/;
|
146
|
-
const METADATA_FILENAME = "_metadata.json";
|
147
|
-
const ERR_OPTIMIZE_DEPS_PROCESSING_ERROR = "ERR_OPTIMIZE_DEPS_PROCESSING_ERROR";
|
148
|
-
const ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR = "ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR";
|
149
|
-
|
150
|
-
//#endregion
|
151
|
-
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts };
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-CMEinpL-.js";
|
3
|
-
import "./dep-BDCsDwBr.js";
|
4
|
-
|
5
|
-
export { createServer };
|
package/dist/node/constants.js
DELETED
@@ -1,4 +0,0 @@
|
|
1
|
-
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts } from "./chunks/dep-BDCsDwBr.js";
|
3
|
-
|
4
|
-
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts };
|