vite 3.2.0 → 3.2.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.
package/dist/node/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { performance } from 'node:perf_hooks';
2
2
  import { EventEmitter } from 'events';
3
- import { z as picocolors, v as createLogger, g as resolveConfig } from './chunks/dep-61d2428a.js';
3
+ import { z as picocolors, v as createLogger, g as resolveConfig } from './chunks/dep-c842e491.js';
4
4
  import { VERSION } from './constants.js';
5
5
  import 'node:fs';
6
6
  import 'node:path';
@@ -8,9 +8,6 @@ import 'node:url';
8
8
  import 'node:module';
9
9
  import 'tty';
10
10
  import 'esbuild';
11
- import 'node:assert';
12
- import 'node:process';
13
- import 'node:util';
14
11
  import 'path';
15
12
  import 'fs';
16
13
  import 'assert';
@@ -23,6 +20,7 @@ import 'os';
23
20
  import 'child_process';
24
21
  import 'node:os';
25
22
  import 'node:crypto';
23
+ import 'node:util';
26
24
  import 'node:dns';
27
25
  import 'resolve';
28
26
  import 'crypto';
@@ -704,7 +702,7 @@ cli
704
702
  filterDuplicateOptions(options);
705
703
  // output structure is preserved even after bundling so require()
706
704
  // is ok here
707
- const { createServer } = await import('./chunks/dep-61d2428a.js').then(function (n) { return n.D; });
705
+ const { createServer } = await import('./chunks/dep-c842e491.js').then(function (n) { return n.D; });
708
706
  try {
709
707
  const server = await createServer({
710
708
  root,
@@ -752,7 +750,7 @@ cli
752
750
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
753
751
  .action(async (root, options) => {
754
752
  filterDuplicateOptions(options);
755
- const { build } = await import('./chunks/dep-61d2428a.js').then(function (n) { return n.C; });
753
+ const { build } = await import('./chunks/dep-c842e491.js').then(function (n) { return n.C; });
756
754
  const buildOptions = cleanOptions(options);
757
755
  try {
758
756
  await build({
@@ -777,7 +775,7 @@ cli
777
775
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
778
776
  .action(async (root, options) => {
779
777
  filterDuplicateOptions(options);
780
- const { optimizeDeps } = await import('./chunks/dep-61d2428a.js').then(function (n) { return n.B; });
778
+ const { optimizeDeps } = await import('./chunks/dep-c842e491.js').then(function (n) { return n.B; });
781
779
  try {
782
780
  const config = await resolveConfig({
783
781
  root,
@@ -802,7 +800,7 @@ cli
802
800
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
803
801
  .action(async (root, options) => {
804
802
  filterDuplicateOptions(options);
805
- const { preview } = await import('./chunks/dep-61d2428a.js').then(function (n) { return n.E; });
803
+ const { preview } = await import('./chunks/dep-c842e491.js').then(function (n) { return n.E; });
806
804
  try {
807
805
  const server = await preview({
808
806
  root,
@@ -1,7 +1,7 @@
1
1
  import path, { resolve } from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
 
4
- var version = "3.2.0";
4
+ var version = "3.2.2";
5
5
 
6
6
  const VERSION = version;
7
7
  const DEFAULT_MAIN_FIELDS = [
@@ -32,7 +32,7 @@ import type { InputOptions } from 'rollup';
32
32
  import { InvalidatePayload } from "../../types/customEvent";
33
33
  import { KnownAsTypeMap } from "../../types/importGlob";
34
34
  import type { LoadResult } from 'rollup';
35
- import type { Matcher as Matcher_2 } from 'picomatch';
35
+
36
36
  import type { ModuleFormat } from 'rollup';
37
37
  import type { ModuleInfo } from 'rollup';
38
38
  import type * as net from 'node:net';
@@ -1,4 +1,4 @@
1
- export { b as build, q as createFilter, v as createLogger, c as createServer, e as defineConfig, f as formatPostcssSourceMap, i as getDepOptimizationConfig, j as isDepsOptimizerEnabled, l as loadConfigFromFile, x as loadEnv, k as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, h as resolveBaseUrl, g as resolveConfig, y as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-61d2428a.js';
1
+ export { b as build, q as createFilter, v as createLogger, c as createServer, e as defineConfig, f as formatPostcssSourceMap, i as getDepOptimizationConfig, j as isDepsOptimizerEnabled, l as loadConfigFromFile, x as loadEnv, k as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, h as resolveBaseUrl, g as resolveConfig, y as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-c842e491.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';
@@ -8,9 +8,6 @@ import 'node:url';
8
8
  import 'node:perf_hooks';
9
9
  import 'node:module';
10
10
  import 'tty';
11
- import 'node:assert';
12
- import 'node:process';
13
- import 'node:util';
14
11
  import 'path';
15
12
  import 'fs';
16
13
  import 'events';
@@ -24,6 +21,7 @@ import 'os';
24
21
  import 'child_process';
25
22
  import 'node:os';
26
23
  import 'node:crypto';
24
+ import 'node:util';
27
25
  import 'node:dns';
28
26
  import 'resolve';
29
27
  import 'crypto';
@@ -31,7 +31,7 @@ var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
31
31
  var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
32
32
  var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
33
33
 
34
- var version = "3.2.0";
34
+ var version = "3.2.2";
35
35
 
36
36
  const VERSION = version;
37
37
  const VITE_PACKAGE_DIR = path$3.resolve(
@@ -4183,14 +4183,6 @@ function loadEnv(mode, envDir, prefixes = 'VITE_') {
4183
4183
  /** mode file */ `.env.${mode}`,
4184
4184
  /** mode local file */ `.env.${mode}.local`
4185
4185
  ];
4186
- // check if there are actual env variables starting with VITE_*
4187
- // these are typically provided inline and should be prioritized
4188
- for (const key in process.env) {
4189
- if (prefixes.some((prefix) => key.startsWith(prefix)) &&
4190
- env[key] === undefined) {
4191
- env[key] = process.env[key];
4192
- }
4193
- }
4194
4186
  const parsed = Object.fromEntries(envFiles.flatMap((file) => {
4195
4187
  const path = lookupFile(envDir, [file], {
4196
4188
  pathOnly: true,
@@ -4219,6 +4211,13 @@ function loadEnv(mode, envDir, prefixes = 'VITE_') {
4219
4211
  process.env.VITE_USER_NODE_ENV = value;
4220
4212
  }
4221
4213
  }
4214
+ // check if there are actual env variables starting with VITE_*
4215
+ // these are typically provided inline and should be prioritized
4216
+ for (const key in process.env) {
4217
+ if (prefixes.some((prefix) => key.startsWith(prefix))) {
4218
+ env[key] = process.env[key];
4219
+ }
4220
+ }
4222
4221
  return env;
4223
4222
  }
4224
4223
  function resolveEnvPrefix({ envPrefix = 'VITE_' }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -28,7 +28,6 @@
28
28
  "dist",
29
29
  "client.d.ts",
30
30
  "index.cjs",
31
- "src/client",
32
31
  "types"
33
32
  ],
34
33
  "engines": {
@@ -69,8 +68,8 @@
69
68
  },
70
69
  "devDependencies": {
71
70
  "@ampproject/remapping": "^2.2.0",
72
- "@babel/parser": "^7.19.6",
73
- "@babel/types": "^7.19.4",
71
+ "@babel/parser": "^7.20.0",
72
+ "@babel/types": "^7.20.0",
74
73
  "@jridgewell/trace-mapping": "^0.3.17",
75
74
  "@rollup/plugin-alias": "^4.0.2",
76
75
  "@rollup/plugin-commonjs": "^22.0.2",
@@ -96,7 +95,6 @@
96
95
  "etag": "^1.8.1",
97
96
  "fast-glob": "^3.2.12",
98
97
  "http-proxy": "^1.18.1",
99
- "import-meta-resolve": "^2.1.0",
100
98
  "json5": "^2.2.1",
101
99
  "launch-editor-middleware": "^2.6.0",
102
100
  "magic-string": "^0.26.7",