vite 5.2.13 → 5.2.14
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 { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-p3C6MpSJ.js';
|
2
2
|
import require$$0__default from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
@@ -32414,8 +32414,8 @@ function createCachedImport(imp) {
|
|
32414
32414
|
return cached;
|
32415
32415
|
};
|
32416
32416
|
}
|
32417
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
32418
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
32417
|
+
const importPostcssImport = createCachedImport(() => import('./dep-DnKw-oY6.js').then(function (n) { return n.i; }));
|
32418
|
+
const importPostcssModules = createCachedImport(() => import('./dep-5EEx826O.js').then(function (n) { return n.i; }));
|
32419
32419
|
const importPostcss = createCachedImport(() => import('postcss'));
|
32420
32420
|
const preprocessorWorkerControllerCache = new WeakMap();
|
32421
32421
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -64889,6 +64889,10 @@ function transformMiddleware(server) {
|
|
64889
64889
|
if (publicDirInRoot && url.startsWith(publicPath)) {
|
64890
64890
|
warnAboutExplicitPublicPathInUrl(url);
|
64891
64891
|
}
|
64892
|
+
if ((rawRE.test(url) || urlRE.test(url)) &&
|
64893
|
+
!ensureServingAccess(url, server, res, next)) {
|
64894
|
+
return;
|
64895
|
+
}
|
64892
64896
|
if (isJSRequest(url) ||
|
64893
64897
|
isImportRequest(url) ||
|
64894
64898
|
isCSSRequest(url) ||
|
@@ -69003,7 +69007,7 @@ function escapeId(id) {
|
|
69003
69007
|
return id.replace(backSlashRegEx, '\\\\').replace(quoteNewlineRegEx, '\\$1');
|
69004
69008
|
}
|
69005
69009
|
const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
|
69006
|
-
const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(partialEncodeURIPath(relativePath))}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
|
69010
|
+
const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(partialEncodeURIPath(relativePath))}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`);
|
69007
69011
|
const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
|
69008
69012
|
const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
|
69009
69013
|
const relativeUrlMechanisms = {
|
package/dist/node/cli.js
CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs';
|
3
3
|
import { performance } from 'node:perf_hooks';
|
4
4
|
import { EventEmitter } from 'events';
|
5
|
-
import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-p3C6MpSJ.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -757,7 +757,7 @@ cli
|
|
757
757
|
filterDuplicateOptions(options);
|
758
758
|
// output structure is preserved even after bundling so require()
|
759
759
|
// is ok here
|
760
|
-
const { createServer } = await import('./chunks/dep-
|
760
|
+
const { createServer } = await import('./chunks/dep-p3C6MpSJ.js').then(function (n) { return n.E; });
|
761
761
|
try {
|
762
762
|
const server = await createServer({
|
763
763
|
root,
|
@@ -836,7 +836,7 @@ cli
|
|
836
836
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
837
837
|
.action(async (root, options) => {
|
838
838
|
filterDuplicateOptions(options);
|
839
|
-
const { build } = await import('./chunks/dep-
|
839
|
+
const { build } = await import('./chunks/dep-p3C6MpSJ.js').then(function (n) { return n.F; });
|
840
840
|
const buildOptions = cleanOptions(options);
|
841
841
|
try {
|
842
842
|
await build({
|
@@ -863,7 +863,7 @@ cli
|
|
863
863
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
864
864
|
.action(async (root, options) => {
|
865
865
|
filterDuplicateOptions(options);
|
866
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
866
|
+
const { optimizeDeps } = await import('./chunks/dep-p3C6MpSJ.js').then(function (n) { return n.D; });
|
867
867
|
try {
|
868
868
|
const config = await resolveConfig({
|
869
869
|
root,
|
@@ -889,7 +889,7 @@ cli
|
|
889
889
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
890
890
|
.action(async (root, options) => {
|
891
891
|
filterDuplicateOptions(options);
|
892
|
-
const { preview } = await import('./chunks/dep-
|
892
|
+
const { preview } = await import('./chunks/dep-p3C6MpSJ.js').then(function (n) { return n.G; });
|
893
893
|
try {
|
894
894
|
const server = await preview({
|
895
895
|
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 build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, a as arraify } from './chunks/dep-p3C6MpSJ.js';
|
3
|
+
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-p3C6MpSJ.js';
|
4
4
|
export { VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import { existsSync, readFileSync } from 'node:fs';
|