vite 6.0.14 → 6.0.15
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.
@@ -1,4 +1,4 @@
|
|
1
|
-
import { O as commonjsGlobal, N as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { O as commonjsGlobal, N as getDefaultExportFromCjs } from './dep-D2y6lPes.js';
|
2
2
|
import require$$0$2 from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
@@ -43725,6 +43725,17 @@ function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) {
|
|
43725
43725
|
return searchForWorkspaceRoot(dir, root);
|
43726
43726
|
}
|
43727
43727
|
|
43728
|
+
function rejectInvalidRequestMiddleware() {
|
43729
|
+
return function viteRejectInvalidRequestMiddleware(req, res, next) {
|
43730
|
+
if (req.url?.includes("#")) {
|
43731
|
+
res.writeHead(400);
|
43732
|
+
res.end();
|
43733
|
+
return;
|
43734
|
+
}
|
43735
|
+
return next();
|
43736
|
+
};
|
43737
|
+
}
|
43738
|
+
|
43728
43739
|
function createServer(inlineConfig = {}) {
|
43729
43740
|
return _createServer(inlineConfig, { listen: true });
|
43730
43741
|
}
|
@@ -44061,6 +44072,7 @@ async function _createServer(inlineConfig = {}, options) {
|
|
44061
44072
|
if (process.env.DEBUG) {
|
44062
44073
|
middlewares.use(timeMiddleware(root));
|
44063
44074
|
}
|
44075
|
+
middlewares.use(rejectInvalidRequestMiddleware());
|
44064
44076
|
const { cors } = serverConfig;
|
44065
44077
|
if (cors !== false) {
|
44066
44078
|
middlewares.use(corsMiddleware(typeof cors === "boolean" ? {} : cors));
|
@@ -48910,8 +48922,8 @@ function createCachedImport(imp) {
|
|
48910
48922
|
return cached;
|
48911
48923
|
};
|
48912
48924
|
}
|
48913
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
48914
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
48925
|
+
const importPostcssImport = createCachedImport(() => import('./dep-CMRFDb7g.js').then(function (n) { return n.i; }));
|
48926
|
+
const importPostcssModules = createCachedImport(() => import('./dep-CqwuCJ6m.js').then(function (n) { return n.i; }));
|
48915
48927
|
const importPostcss = createCachedImport(() => import('postcss'));
|
48916
48928
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
48917
48929
|
let alwaysFakeWorkerWorkerControllerCache;
|
package/dist/node/cli.js
CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
2
2
|
import fs__default from 'node:fs';
|
3
3
|
import { performance } from 'node:perf_hooks';
|
4
4
|
import { EventEmitter } from 'events';
|
5
|
-
import { M as colors, G as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { M as colors, G as createLogger, r as resolveConfig } from './chunks/dep-D2y6lPes.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -741,7 +741,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
741
741
|
`[boolean] force the optimizer to ignore the cache and re-bundle`
|
742
742
|
).action(async (root, options) => {
|
743
743
|
filterDuplicateOptions(options);
|
744
|
-
const { createServer } = await import('./chunks/dep-
|
744
|
+
const { createServer } = await import('./chunks/dep-D2y6lPes.js').then(function (n) { return n.Q; });
|
745
745
|
try {
|
746
746
|
const server = await createServer({
|
747
747
|
root,
|
@@ -834,7 +834,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
834
834
|
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
|
835
835
|
async (root, options) => {
|
836
836
|
filterDuplicateOptions(options);
|
837
|
-
const { createBuilder } = await import('./chunks/dep-
|
837
|
+
const { createBuilder } = await import('./chunks/dep-D2y6lPes.js').then(function (n) { return n.R; });
|
838
838
|
const buildOptions = cleanGlobalCLIOptions(
|
839
839
|
cleanBuilderCLIOptions(options)
|
840
840
|
);
|
@@ -869,7 +869,7 @@ cli.command("optimize [root]", "pre-bundle dependencies").option(
|
|
869
869
|
).action(
|
870
870
|
async (root, options) => {
|
871
871
|
filterDuplicateOptions(options);
|
872
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
872
|
+
const { optimizeDeps } = await import('./chunks/dep-D2y6lPes.js').then(function (n) { return n.P; });
|
873
873
|
try {
|
874
874
|
const config = await resolveConfig(
|
875
875
|
{
|
@@ -895,7 +895,7 @@ ${e.stack}`),
|
|
895
895
|
cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(
|
896
896
|
async (root, options) => {
|
897
897
|
filterDuplicateOptions(options);
|
898
|
-
const { preview } = await import('./chunks/dep-
|
898
|
+
const { preview } = await import('./chunks/dep-D2y6lPes.js').then(function (n) { return n.S; });
|
899
899
|
try {
|
900
900
|
const server = await preview({
|
901
901
|
root,
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { i as isInNodeModules, a as arraify } from './chunks/dep-
|
3
|
-
export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, C as createFilter, h as createIdResolver, G as createLogger, n as createRunnableDevEnvironment, c as createServer, w as createServerHotChannel, v as createServerModuleRunner, d as defineConfig, u as fetchModule, j as formatPostcssSourceMap, J as isFileLoadingAllowed, I as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, K as loadEnv, A as mergeAlias, z as mergeConfig, x as moduleRunnerTransform, y as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, L as resolveEnvPrefix, E as rollupVersion, H as searchForWorkspaceRoot, F as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, a as arraify } from './chunks/dep-D2y6lPes.js';
|
3
|
+
export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, C as createFilter, h as createIdResolver, G as createLogger, n as createRunnableDevEnvironment, c as createServer, w as createServerHotChannel, v as createServerModuleRunner, d as defineConfig, u as fetchModule, j as formatPostcssSourceMap, J as isFileLoadingAllowed, I as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, K as loadEnv, A as mergeAlias, z as mergeConfig, x as moduleRunnerTransform, y as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, L as resolveEnvPrefix, E as rollupVersion, H as searchForWorkspaceRoot, F as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-D2y6lPes.js';
|
4
4
|
export { DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import 'node:fs';
|