vite 4.1.4 → 4.2.0-beta.0

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.

package/dist/node/cli.js CHANGED
@@ -2,14 +2,13 @@ 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-ca21228b.js';
5
+ import { A as picocolorsExports, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-ae3bb4e1.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:url';
8
8
  import 'node:module';
9
9
  import 'tty';
10
10
  import 'esbuild';
11
11
  import 'path';
12
- import './chunks/dep-ace95160.js';
13
12
  import 'fs';
14
13
  import 'assert';
15
14
  import 'util';
@@ -39,8 +38,8 @@ import 'node:http';
39
38
  import 'node:https';
40
39
  import 'rollup';
41
40
  import 'querystring';
42
- import 'node:child_process';
43
41
  import 'node:readline';
42
+ import 'node:child_process';
44
43
  import 'node:zlib';
45
44
 
46
45
  function toArr(any) {
@@ -729,7 +728,7 @@ cli
729
728
  filterDuplicateOptions(options);
730
729
  // output structure is preserved even after bundling so require()
731
730
  // is ok here
732
- const { createServer } = await import('./chunks/dep-ca21228b.js').then(function (n) { return n.E; });
731
+ const { createServer } = await import('./chunks/dep-ae3bb4e1.js').then(function (n) { return n.F; });
733
732
  try {
734
733
  const server = await createServer({
735
734
  root,
@@ -797,7 +796,7 @@ cli
797
796
  .option('--assetsDir <dir>', `[string] directory under outDir to place assets in (default: assets)`)
798
797
  .option('--assetsInlineLimit <number>', `[number] static asset base64 inline threshold in bytes (default: 4096)`)
799
798
  .option('--ssr [entry]', `[string] build specified entry for server-side rendering`)
800
- .option('--sourcemap', `[boolean] output source maps for build (default: false)`)
799
+ .option('--sourcemap [output]', `[boolean | "inline" | "hidden"] output source maps for build (default: false)`)
801
800
  .option('--minify [minifier]', `[boolean | "terser" | "esbuild"] enable/disable minification, ` +
802
801
  `or specify minifier to use (default: esbuild)`)
803
802
  .option('--manifest [name]', `[boolean | string] emit build manifest json`)
@@ -807,7 +806,7 @@ cli
807
806
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
808
807
  .action(async (root, options) => {
809
808
  filterDuplicateOptions(options);
810
- const { build } = await import('./chunks/dep-ca21228b.js').then(function (n) { return n.D; });
809
+ const { build } = await import('./chunks/dep-ae3bb4e1.js').then(function (n) { return n.E; });
811
810
  const buildOptions = cleanOptions(options);
812
811
  try {
813
812
  await build({
@@ -835,7 +834,7 @@ cli
835
834
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
836
835
  .action(async (root, options) => {
837
836
  filterDuplicateOptions(options);
838
- const { optimizeDeps } = await import('./chunks/dep-ca21228b.js').then(function (n) { return n.C; });
837
+ const { optimizeDeps } = await import('./chunks/dep-ae3bb4e1.js').then(function (n) { return n.D; });
839
838
  try {
840
839
  const config = await resolveConfig({
841
840
  root,
@@ -860,7 +859,7 @@ cli
860
859
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
861
860
  .action(async (root, options) => {
862
861
  filterDuplicateOptions(options);
863
- const { preview } = await import('./chunks/dep-ca21228b.js').then(function (n) { return n.F; });
862
+ const { preview } = await import('./chunks/dep-ae3bb4e1.js').then(function (n) { return n.G; });
864
863
  try {
865
864
  const server = await preview({
866
865
  root,
@@ -2614,6 +2614,10 @@ export declare interface ViteDevServer {
2614
2614
  * @param forceOptimize - force the optimizer to re-bundle, same as --force cli flag
2615
2615
  */
2616
2616
  restart(forceOptimize?: boolean): Promise<void>;
2617
+ /**
2618
+ * Open browser
2619
+ */
2620
+ openBrowser(): void;
2617
2621
  /* Excluded from this release type: _importGlobMap */
2618
2622
  /* Excluded from this release type: _ssrExternals */
2619
2623
  /* Excluded from this release type: _restartPromise */
@@ -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-ca21228b.js';
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-ae3bb4e1.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';
@@ -9,7 +9,6 @@ import 'node:perf_hooks';
9
9
  import 'node:module';
10
10
  import 'tty';
11
11
  import 'path';
12
- import './chunks/dep-ace95160.js';
13
12
  import 'fs';
14
13
  import 'events';
15
14
  import 'assert';
@@ -39,8 +38,8 @@ import 'tls';
39
38
  import 'node:http';
40
39
  import 'node:https';
41
40
  import 'querystring';
42
- import 'node:child_process';
43
41
  import 'node:readline';
42
+ import 'node:child_process';
44
43
  import 'node:zlib';
45
44
 
46
45
  // This file will be built for both ESM and CJS. Avoid relying on other modules as possible.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "4.1.4",
3
+ "version": "4.2.0-beta.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -66,18 +66,18 @@
66
66
  },
67
67
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
68
68
  "dependencies": {
69
- "esbuild": "^0.16.14",
69
+ "esbuild": "^0.17.5",
70
70
  "postcss": "^8.4.21",
71
71
  "resolve": "^1.22.1",
72
- "rollup": "^3.10.0"
72
+ "rollup": "^3.17.2"
73
73
  },
74
74
  "optionalDependencies": {
75
75
  "fsevents": "~2.3.2"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@ampproject/remapping": "^2.2.0",
79
- "@babel/parser": "^7.20.13",
80
- "@babel/types": "^7.20.7",
79
+ "@babel/parser": "^7.21.2",
80
+ "@babel/types": "^7.21.2",
81
81
  "@jridgewell/trace-mapping": "^0.3.17",
82
82
  "@rollup/plugin-alias": "^4.0.3",
83
83
  "@rollup/plugin-commonjs": "^24.0.1",
@@ -99,19 +99,19 @@
99
99
  "dep-types": "link:./src/types",
100
100
  "dotenv": "^16.0.3",
101
101
  "dotenv-expand": "^9.0.0",
102
- "es-module-lexer": "^1.1.0",
102
+ "es-module-lexer": "1.1.0",
103
103
  "estree-walker": "^3.0.3",
104
104
  "etag": "^1.8.1",
105
105
  "fast-glob": "^3.2.12",
106
106
  "http-proxy": "^1.18.1",
107
107
  "json-stable-stringify": "^1.0.2",
108
108
  "launch-editor-middleware": "^2.6.0",
109
- "magic-string": "^0.27.0",
109
+ "magic-string": "^0.30.0",
110
110
  "micromatch": "^4.0.5",
111
- "mlly": "^1.1.0",
111
+ "mlly": "^1.1.1",
112
112
  "mrmime": "^1.0.1",
113
113
  "okie": "^1.0.1",
114
- "open": "^8.4.0",
114
+ "open": "^8.4.2",
115
115
  "parse5": "^7.1.2",
116
116
  "periscopic": "^3.1.0",
117
117
  "picocolors": "^1.0.0",
@@ -126,11 +126,11 @@
126
126
  "source-map-support": "^0.5.21",
127
127
  "strip-ansi": "^7.0.1",
128
128
  "strip-literal": "^1.0.1",
129
- "tsconfck": "^2.0.2",
129
+ "tsconfck": "^2.0.3",
130
130
  "tslib": "^2.5.0",
131
131
  "types": "link:./types",
132
- "ufo": "^1.0.1",
133
- "ws": "^8.12.0"
132
+ "ufo": "^1.1.0",
133
+ "ws": "^8.12.1"
134
134
  },
135
135
  "peerDependencies": {
136
136
  "@types/node": ">= 14",
@@ -1,43 +0,0 @@
1
- import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
2
- import { dirname as __cjs_dirname } from 'node:path';
3
- import { createRequire as __cjs_createRequire } from 'node:module';
4
-
5
- const __filename = __cjs_fileURLToPath(import.meta.url);
6
- const __dirname = __cjs_dirname(__filename);
7
- const require = __cjs_createRequire(import.meta.url);
8
- const __require = require;
9
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
-
11
- function getDefaultExportFromCjs (x) {
12
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
13
- }
14
-
15
- function getAugmentedNamespace(n) {
16
- if (n.__esModule) return n;
17
- var f = n.default;
18
- if (typeof f == "function") {
19
- var a = function a () {
20
- if (this instanceof a) {
21
- var args = [null];
22
- args.push.apply(args, arguments);
23
- var Ctor = Function.bind.apply(f, args);
24
- return new Ctor();
25
- }
26
- return f.apply(this, arguments);
27
- };
28
- a.prototype = f.prototype;
29
- } else a = {};
30
- Object.defineProperty(a, '__esModule', {value: true});
31
- Object.keys(n).forEach(function (k) {
32
- var d = Object.getOwnPropertyDescriptor(n, k);
33
- Object.defineProperty(a, k, d.get ? d : {
34
- enumerable: true,
35
- get: function () {
36
- return n[k];
37
- }
38
- });
39
- });
40
- return a;
41
- }
42
-
43
- export { getAugmentedNamespace as a, commonjsGlobal as c, getDefaultExportFromCjs as g };