vite 4.2.0-beta.0 → 4.2.0-beta.1
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/chunks/{dep-ae3bb4e1.js → dep-a18b8a7b.js} +690 -463
- package/dist/node/chunks/{dep-51508e52.js → dep-d2a7fe01.js} +1 -1
- package/dist/node/cli.js +6 -5
- package/dist/node/index.d.ts +14 -1
- package/dist/node/index.js +2 -1
- package/dist/node-cjs/publicUtils.cjs +3 -3
- package/package.json +4 -4
|
@@ -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-a18b8a7b.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-a18b8a7b.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:module';
|
|
@@ -25,6 +25,7 @@ import 'node:dns';
|
|
|
25
25
|
import 'resolve';
|
|
26
26
|
import 'crypto';
|
|
27
27
|
import 'node:buffer';
|
|
28
|
+
import 'node:fs/promises';
|
|
28
29
|
import 'module';
|
|
29
30
|
import 'node:assert';
|
|
30
31
|
import 'node:process';
|
|
@@ -728,7 +729,7 @@ cli
|
|
|
728
729
|
filterDuplicateOptions(options);
|
|
729
730
|
// output structure is preserved even after bundling so require()
|
|
730
731
|
// is ok here
|
|
731
|
-
const { createServer } = await import('./chunks/dep-
|
|
732
|
+
const { createServer } = await import('./chunks/dep-a18b8a7b.js').then(function (n) { return n.F; });
|
|
732
733
|
try {
|
|
733
734
|
const server = await createServer({
|
|
734
735
|
root,
|
|
@@ -806,7 +807,7 @@ cli
|
|
|
806
807
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
807
808
|
.action(async (root, options) => {
|
|
808
809
|
filterDuplicateOptions(options);
|
|
809
|
-
const { build } = await import('./chunks/dep-
|
|
810
|
+
const { build } = await import('./chunks/dep-a18b8a7b.js').then(function (n) { return n.E; });
|
|
810
811
|
const buildOptions = cleanOptions(options);
|
|
811
812
|
try {
|
|
812
813
|
await build({
|
|
@@ -834,7 +835,7 @@ cli
|
|
|
834
835
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
835
836
|
.action(async (root, options) => {
|
|
836
837
|
filterDuplicateOptions(options);
|
|
837
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
838
|
+
const { optimizeDeps } = await import('./chunks/dep-a18b8a7b.js').then(function (n) { return n.D; });
|
|
838
839
|
try {
|
|
839
840
|
const config = await resolveConfig({
|
|
840
841
|
root,
|
|
@@ -859,7 +860,7 @@ cli
|
|
|
859
860
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
860
861
|
.action(async (root, options) => {
|
|
861
862
|
filterDuplicateOptions(options);
|
|
862
|
-
const { preview } = await import('./chunks/dep-
|
|
863
|
+
const { preview } = await import('./chunks/dep-a18b8a7b.js').then(function (n) { return n.G; });
|
|
863
864
|
try {
|
|
864
865
|
const server = await preview({
|
|
865
866
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { version as esbuildVersion } from 'esbuild';
|
|
|
17
17
|
import { EventEmitter } from 'node:events';
|
|
18
18
|
import * as events from 'node:events';
|
|
19
19
|
import type { ExistingRawSourceMap } from 'rollup';
|
|
20
|
+
import type { Exports } from 'resolve.exports';
|
|
20
21
|
import type * as fs from 'node:fs';
|
|
21
22
|
import { FullReloadPayload } from "../../types/hmrPayload";
|
|
22
23
|
import { GeneralImportGlobOptions } from "../../types/importGlob";
|
|
@@ -26,6 +27,7 @@ import * as http from 'node:http';
|
|
|
26
27
|
import { ImportGlobEagerFunction } from "../../types/importGlob";
|
|
27
28
|
import { ImportGlobFunction } from "../../types/importGlob";
|
|
28
29
|
import { ImportGlobOptions } from "../../types/importGlob";
|
|
30
|
+
import type { Imports } from 'resolve.exports';
|
|
29
31
|
import type { IncomingMessage } from 'node:http';
|
|
30
32
|
import { InferCustomEventPayload } from "../../types/customEvent";
|
|
31
33
|
import type { InputOption } from 'rollup';
|
|
@@ -1418,7 +1420,8 @@ export declare interface PackageData {
|
|
|
1418
1420
|
main: string;
|
|
1419
1421
|
module: string;
|
|
1420
1422
|
browser: string | Record<string, string | false>;
|
|
1421
|
-
exports:
|
|
1423
|
+
exports: Exports;
|
|
1424
|
+
imports: Imports;
|
|
1422
1425
|
dependencies: Record<string, string>;
|
|
1423
1426
|
};
|
|
1424
1427
|
}
|
|
@@ -1701,6 +1704,7 @@ export declare interface ResolvedPreviewOptions extends PreviewOptions {
|
|
|
1701
1704
|
export declare interface ResolvedServerOptions extends ServerOptions {
|
|
1702
1705
|
fs: Required<FileSystemServeOptions>;
|
|
1703
1706
|
middlewareMode: boolean;
|
|
1707
|
+
sourcemapIgnoreList: Exclude<ServerOptions['sourcemapIgnoreList'], false | undefined>;
|
|
1704
1708
|
}
|
|
1705
1709
|
|
|
1706
1710
|
export declare interface ResolvedServerUrls {
|
|
@@ -2070,6 +2074,15 @@ export declare interface ServerOptions extends CommonServerOptions {
|
|
|
2070
2074
|
* @default true
|
|
2071
2075
|
*/
|
|
2072
2076
|
preTransformRequests?: boolean;
|
|
2077
|
+
/**
|
|
2078
|
+
* Whether or not to ignore-list source files in the dev server sourcemap, used to populate
|
|
2079
|
+
* the [`x_google_ignoreList` source map extension](https://developer.chrome.com/blog/devtools-better-angular-debugging/#the-x_google_ignorelist-source-map-extension).
|
|
2080
|
+
*
|
|
2081
|
+
* By default, it excludes all paths containing `node_modules`. You can pass `false` to
|
|
2082
|
+
* disable this behavior, or, for full control, a function that takes the source path and
|
|
2083
|
+
* sourcemap path and returns whether to ignore the source path.
|
|
2084
|
+
*/
|
|
2085
|
+
sourcemapIgnoreList?: false | ((sourcePath: string, sourcemapPath: string) => boolean);
|
|
2073
2086
|
/**
|
|
2074
2087
|
* Force dep pre-optimization regardless of whether deps have changed.
|
|
2075
2088
|
*
|
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-a18b8a7b.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';
|
|
@@ -26,6 +26,7 @@ import 'node:dns';
|
|
|
26
26
|
import 'resolve';
|
|
27
27
|
import 'crypto';
|
|
28
28
|
import 'node:buffer';
|
|
29
|
+
import 'node:fs/promises';
|
|
29
30
|
import 'module';
|
|
30
31
|
import 'node:assert';
|
|
31
32
|
import 'node:process';
|
|
@@ -16,11 +16,11 @@ var require$$1$1 = require('fs');
|
|
|
16
16
|
var readline = require('node:readline');
|
|
17
17
|
var require$$2 = require('os');
|
|
18
18
|
|
|
19
|
-
const { version: version$2 } = JSON.parse(fs$1.readFileSync(new URL('../../package.json', (typeof document === 'undefined' ?
|
|
19
|
+
const { version: version$2 } = JSON.parse(fs$1.readFileSync(new URL('../../package.json', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)))).toString());
|
|
20
20
|
const VERSION = version$2;
|
|
21
21
|
const VITE_PACKAGE_DIR = path$3.resolve(
|
|
22
22
|
// import.meta.url is `dist/node/constants.js` after bundle
|
|
23
|
-
node_url.fileURLToPath((typeof document === 'undefined' ?
|
|
23
|
+
node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))), '../../..');
|
|
24
24
|
const CLIENT_ENTRY = path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/client.mjs');
|
|
25
25
|
path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/env.mjs');
|
|
26
26
|
path$3.dirname(CLIENT_ENTRY);
|
|
@@ -3408,7 +3408,7 @@ function slash(p) {
|
|
|
3408
3408
|
return p.replace(/\\/g, '/');
|
|
3409
3409
|
}
|
|
3410
3410
|
// TODO: use import()
|
|
3411
|
-
const _require = node_module.createRequire((typeof document === 'undefined' ?
|
|
3411
|
+
const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)));
|
|
3412
3412
|
try {
|
|
3413
3413
|
Boolean(_require('pnpapi'));
|
|
3414
3414
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "4.2.0-beta.
|
|
3
|
+
"version": "4.2.0-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"esbuild": "^0.17.5",
|
|
70
70
|
"postcss": "^8.4.21",
|
|
71
71
|
"resolve": "^1.22.1",
|
|
72
|
-
"rollup": "^3.
|
|
72
|
+
"rollup": "^3.18.0"
|
|
73
73
|
},
|
|
74
74
|
"optionalDependencies": {
|
|
75
75
|
"fsevents": "~2.3.2"
|
|
@@ -99,7 +99,7 @@
|
|
|
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.
|
|
102
|
+
"es-module-lexer": "^1.2.0",
|
|
103
103
|
"estree-walker": "^3.0.3",
|
|
104
104
|
"etag": "^1.8.1",
|
|
105
105
|
"fast-glob": "^3.2.12",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"postcss-import": "^15.1.0",
|
|
120
120
|
"postcss-load-config": "^4.0.1",
|
|
121
121
|
"postcss-modules": "^6.0.0",
|
|
122
|
-
"resolve.exports": "^2.0.
|
|
122
|
+
"resolve.exports": "^2.0.1",
|
|
123
123
|
"rollup-plugin-license": "^3.0.1",
|
|
124
124
|
"sirv": "^2.0.2",
|
|
125
125
|
"source-map-js": "^1.0.2",
|