vite 4.0.4 → 4.0.5
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.
|
@@ -36526,7 +36526,7 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
36526
36526
|
}));
|
|
36527
36527
|
}
|
|
36528
36528
|
if (isModule) {
|
|
36529
|
-
postcssPlugins.unshift((await import('./dep-
|
|
36529
|
+
postcssPlugins.unshift((await import('./dep-cf26f61d.js').then(function (n) { return n.i; })).default({
|
|
36530
36530
|
...modulesOptions,
|
|
36531
36531
|
localsConvention: modulesOptions?.localsConvention,
|
|
36532
36532
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
@@ -39036,7 +39036,7 @@ function serveStaticMiddleware(dir, server) {
|
|
|
39036
39036
|
isInternalRequest(req.url)) {
|
|
39037
39037
|
return next();
|
|
39038
39038
|
}
|
|
39039
|
-
const url = new URL(req.url, 'http://example.com');
|
|
39039
|
+
const url = new URL(req.url.replace(/^\/+/, '/'), 'http://example.com');
|
|
39040
39040
|
const pathname = decodeURIComponent(url.pathname);
|
|
39041
39041
|
// apply aliases to static requests as well
|
|
39042
39042
|
let redirectedPathname;
|
|
@@ -39074,7 +39074,7 @@ function serveRawFsMiddleware(server) {
|
|
|
39074
39074
|
const serveFromRoot = sirv('/', sirvOptions({ headers: server.config.server.headers }));
|
|
39075
39075
|
// Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...`
|
|
39076
39076
|
return function viteServeRawFsMiddleware(req, res, next) {
|
|
39077
|
-
const url = new URL(req.url, 'http://example.com');
|
|
39077
|
+
const url = new URL(req.url.replace(/^\/+/, '/'), 'http://example.com');
|
|
39078
39078
|
// In some cases (e.g. linked monorepos) files outside of root will
|
|
39079
39079
|
// reference assets that are also out of served root. In such cases
|
|
39080
39080
|
// the paths are rewritten to `/@fs/` prefixed paths and must be served by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import require$$0__default from 'fs';
|
|
2
2
|
import require$$0 from 'postcss';
|
|
3
|
-
import { C as commonjsGlobal } from './dep-
|
|
3
|
+
import { C as commonjsGlobal } from './dep-9cd3c8cb.js';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
5
5
|
import require$$5 from 'crypto';
|
|
6
6
|
import require$$0$2 from 'util';
|
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 picocolorsExports, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { A as picocolorsExports, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-9cd3c8cb.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:module';
|
|
@@ -724,7 +724,7 @@ cli
|
|
|
724
724
|
filterDuplicateOptions(options);
|
|
725
725
|
// output structure is preserved even after bundling so require()
|
|
726
726
|
// is ok here
|
|
727
|
-
const { createServer } = await import('./chunks/dep-
|
|
727
|
+
const { createServer } = await import('./chunks/dep-9cd3c8cb.js').then(function (n) { return n.F; });
|
|
728
728
|
try {
|
|
729
729
|
const server = await createServer({
|
|
730
730
|
root,
|
|
@@ -802,7 +802,7 @@ cli
|
|
|
802
802
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
803
803
|
.action(async (root, options) => {
|
|
804
804
|
filterDuplicateOptions(options);
|
|
805
|
-
const { build } = await import('./chunks/dep-
|
|
805
|
+
const { build } = await import('./chunks/dep-9cd3c8cb.js').then(function (n) { return n.E; });
|
|
806
806
|
const buildOptions = cleanOptions(options);
|
|
807
807
|
try {
|
|
808
808
|
await build({
|
|
@@ -830,7 +830,7 @@ cli
|
|
|
830
830
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
831
831
|
.action(async (root, options) => {
|
|
832
832
|
filterDuplicateOptions(options);
|
|
833
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
833
|
+
const { optimizeDeps } = await import('./chunks/dep-9cd3c8cb.js').then(function (n) { return n.D; });
|
|
834
834
|
try {
|
|
835
835
|
const config = await resolveConfig({
|
|
836
836
|
root,
|
|
@@ -855,7 +855,7 @@ cli
|
|
|
855
855
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
856
856
|
.action(async (root, options) => {
|
|
857
857
|
filterDuplicateOptions(options);
|
|
858
|
-
const { preview } = await import('./chunks/dep-
|
|
858
|
+
const { preview } = await import('./chunks/dep-9cd3c8cb.js').then(function (n) { return n.G; });
|
|
859
859
|
try {
|
|
860
860
|
const server = await preview({
|
|
861
861
|
root,
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-9cd3c8cb.js';
|
|
2
2
|
export { VERSION as version } from './constants.js';
|
|
3
3
|
export { version as esbuildVersion } from 'esbuild';
|
|
4
4
|
export { VERSION as rollupVersion } from 'rollup';
|