vite 7.2.7 → 8.0.0-beta.1
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 +33 -44
- package/dist/client/client.mjs +39 -5
- package/dist/node/chunks/build.js +1 -1
- package/dist/node/chunks/config.js +3 -35975
- package/dist/node/chunks/logger.js +7 -11
- package/dist/node/chunks/node.js +36036 -0
- package/dist/node/chunks/optimizer.js +1 -1
- package/dist/node/chunks/preview.js +1 -1
- package/dist/node/chunks/server.js +1 -1
- package/dist/node/cli.js +5 -4
- package/dist/node/index.d.ts +215 -78
- package/dist/node/index.js +2 -28
- package/dist/node/internal.d.ts +2 -0
- package/dist/node/internal.js +3 -0
- package/package.json +15 -22
- package/types/customEvent.d.ts +3 -1
- package/types/hmrPayload.d.ts +6 -0
- package/types/hot.d.ts +1 -1
- package/types/importMeta.d.ts +2 -2
- package/types/internal/esbuildOptions.d.ts +28 -0
- package/types/internal/rollupTypeCompat.d.ts +24 -0
- package/types/metadata.d.ts +6 -1
- package/dist/node/chunks/config2.js +0 -4
- package/types/package.json +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./logger.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as discoverProjectDependencies, J as cleanupDepsCacheStaleDirs, K as addManuallyIncludedOptimizeDeps, Q as depsLogString, X as createIsOptimizedDepUrl, Y as createIsOptimizedDepFile, Z as depsFromOptimizedDepInfo, at as loadCachedDepOptimizationMetadata, ct as optimizedDepInfoFromFile, dt as runOptimizeDeps, et as extractExportsData, ft as toDiscoveredDependencies, it as isDepOptimizationDisabled, lt as optimizedDepInfoFromId, nt as getOptimizedDepPath, ot as optimizeDeps, q as addOptimizedDepInfo, rt as initDepsOptimizerMetadata, st as optimizeExplicitEnvironmentDeps, tt as getDepsCacheDir, ut as optimizedDepNeedsInterop } from "./node.js";
|
|
3
3
|
|
|
4
4
|
export { optimizeDeps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./logger.js";
|
|
2
|
-
import {
|
|
2
|
+
import { _t as resolveServerOptions, gt as createServerCloseFn, ht as createServer, mt as _createServer, vt as restartServerWithUrls, yt as serverConfigDefaults } from "./node.js";
|
|
3
3
|
|
|
4
4
|
export { createServer };
|
package/dist/node/cli.js
CHANGED
|
@@ -564,8 +564,8 @@ const convertBase = (v) => {
|
|
|
564
564
|
if (v === 0) return "";
|
|
565
565
|
return v;
|
|
566
566
|
};
|
|
567
|
-
cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with
|
|
568
|
-
cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--open [path]", `[boolean | string] open browser on startup`).option("--cors", `[boolean] enable CORS`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
|
567
|
+
cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with Rolldown, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle)`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
|
|
568
|
+
cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--open [path]", `[boolean | string] open browser on startup`).option("--cors", `[boolean] enable CORS`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).option("--experimentalBundle", `[boolean] use experimental full bundle mode (this is highly experimental)`).action(async (root, options) => {
|
|
569
569
|
filterDuplicateOptions(options);
|
|
570
570
|
const { createServer } = await import("./chunks/server.js");
|
|
571
571
|
try {
|
|
@@ -578,7 +578,8 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
|
578
578
|
logLevel: options.logLevel,
|
|
579
579
|
clearScreen: options.clearScreen,
|
|
580
580
|
server: cleanGlobalCLIOptions(options),
|
|
581
|
-
forceOptimizeDeps: options.force
|
|
581
|
+
forceOptimizeDeps: options.force,
|
|
582
|
+
experimental: { bundledDev: options.experimentalBundle }
|
|
582
583
|
});
|
|
583
584
|
if (!server.httpServer) throw new Error("HTTP server not available");
|
|
584
585
|
await server.listen();
|
|
@@ -646,7 +647,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
|
646
647
|
});
|
|
647
648
|
cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)").option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
|
648
649
|
filterDuplicateOptions(options);
|
|
649
|
-
const { resolveConfig } = await import("./chunks/
|
|
650
|
+
const { resolveConfig } = await import("./chunks/config.js");
|
|
650
651
|
const { optimizeDeps } = await import("./chunks/optimizer.js");
|
|
651
652
|
try {
|
|
652
653
|
await optimizeDeps(await resolveConfig({
|