vite 5.0.1 → 5.0.2

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 { y as getDefaultExportFromCjs } from './dep-VPh1kAXQ.js';
1
+ import { y as getDefaultExportFromCjs } from './dep-ErEj4WmL.js';
2
2
  import require$$0 from 'path';
3
3
  import require$$0__default from 'fs';
4
4
  import { l as lib } from './dep-8a-6Quh6.js';
@@ -38509,8 +38509,8 @@ function createCachedImport(imp) {
38509
38509
  return cached;
38510
38510
  };
38511
38511
  }
38512
- const importPostcssImport = createCachedImport(() => import('./dep-2UYu25Ks.js').then(function (n) { return n.i; }));
38513
- const importPostcssModules = createCachedImport(() => import('./dep-1HTAyDZa.js').then(function (n) { return n.i; }));
38512
+ const importPostcssImport = createCachedImport(() => import('./dep-CV-Y9tzJ.js').then(function (n) { return n.i; }));
38513
+ const importPostcssModules = createCachedImport(() => import('./dep-sKpqGbYj.js').then(function (n) { return n.i; }));
38514
38514
  const importPostcss = createCachedImport(() => import('postcss'));
38515
38515
  /**
38516
38516
  * @experimental
@@ -57162,10 +57162,9 @@ function htmlFallbackMiddleware(root, spaFallback) {
57162
57162
  if (
57163
57163
  // Only accept GET or HEAD
57164
57164
  (req.method !== 'GET' && req.method !== 'HEAD') ||
57165
- // Ignore JSON requests
57166
- req.headers.accept?.includes('application/json') ||
57167
57165
  // Require Accept: text/html or */*
57168
57166
  !(req.headers.accept === undefined || // equivalent to `Accept: */*`
57167
+ req.headers.accept === '' || // equivalent to `Accept: */*`
57169
57168
  req.headers.accept.includes('text/html') ||
57170
57169
  req.headers.accept.includes('*/*'))) {
57171
57170
  return next();
@@ -1,4 +1,4 @@
1
- import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-VPh1kAXQ.js';
1
+ import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-ErEj4WmL.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
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 { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-VPh1kAXQ.js';
5
+ import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-ErEj4WmL.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -759,7 +759,7 @@ cli
759
759
  filterDuplicateOptions(options);
760
760
  // output structure is preserved even after bundling so require()
761
761
  // is ok here
762
- const { createServer } = await import('./chunks/dep-VPh1kAXQ.js').then(function (n) { return n.A; });
762
+ const { createServer } = await import('./chunks/dep-ErEj4WmL.js').then(function (n) { return n.A; });
763
763
  try {
764
764
  const server = await createServer({
765
765
  root,
@@ -839,7 +839,7 @@ cli
839
839
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
840
840
  .action(async (root, options) => {
841
841
  filterDuplicateOptions(options);
842
- const { build } = await import('./chunks/dep-VPh1kAXQ.js').then(function (n) { return n.C; });
842
+ const { build } = await import('./chunks/dep-ErEj4WmL.js').then(function (n) { return n.C; });
843
843
  const buildOptions = cleanOptions(options);
844
844
  try {
845
845
  await build({
@@ -867,7 +867,7 @@ cli
867
867
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
868
868
  .action(async (root, options) => {
869
869
  filterDuplicateOptions(options);
870
- const { optimizeDeps } = await import('./chunks/dep-VPh1kAXQ.js').then(function (n) { return n.B; });
870
+ const { optimizeDeps } = await import('./chunks/dep-ErEj4WmL.js').then(function (n) { return n.B; });
871
871
  try {
872
872
  const config = await resolveConfig({
873
873
  root,
@@ -893,7 +893,7 @@ cli
893
893
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
894
894
  .action(async (root, options) => {
895
895
  filterDuplicateOptions(options);
896
- const { preview } = await import('./chunks/dep-VPh1kAXQ.js').then(function (n) { return n.D; });
896
+ const { preview } = await import('./chunks/dep-ErEj4WmL.js').then(function (n) { return n.D; });
897
897
  try {
898
898
  const server = await preview({
899
899
  root,
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { i as isInNodeModules } from './chunks/dep-VPh1kAXQ.js';
3
- export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-VPh1kAXQ.js';
2
+ import { i as isInNodeModules } from './chunks/dep-ErEj4WmL.js';
3
+ export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-ErEj4WmL.js';
4
4
  export { VERSION as version } from './constants.js';
5
5
  export { version as esbuildVersion } from 'esbuild';
6
6
  export { VERSION as rollupVersion } from 'rollup';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",