vite 5.1.0-beta.1 → 5.1.0-beta.3
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/LICENSE.md +30 -29
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-vM06sRGH.js → dep-A6C2SOTv.js} +1 -1
- package/dist/node/chunks/{dep-jUaJI_Cb.js → dep-jalgWsWD.js} +732 -364
- package/dist/node/chunks/{dep-pPggWEp0.js → dep-tbVWvdXL.js} +1 -1
- package/dist/node/cli.js +6 -6
- package/dist/node/index.d.ts +18 -1
- package/dist/node/index.js +3 -3
- package/package.json +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
import { A as commonjsGlobal, z as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { A as commonjsGlobal, z as getDefaultExportFromCjs } from './dep-jalgWsWD.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 { y as colors, q as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { y as colors, q as createLogger, r as resolveConfig } from './chunks/dep-jalgWsWD.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -30,6 +30,7 @@ import 'crypto';
|
|
30
30
|
import 'module';
|
31
31
|
import 'node:assert';
|
32
32
|
import 'node:v8';
|
33
|
+
import 'node:worker_threads';
|
33
34
|
import 'node:buffer';
|
34
35
|
import 'rollup';
|
35
36
|
import 'rollup/parseAst';
|
@@ -41,7 +42,6 @@ import 'buffer';
|
|
41
42
|
import 'https';
|
42
43
|
import 'tls';
|
43
44
|
import 'node:zlib';
|
44
|
-
import 'worker_threads';
|
45
45
|
|
46
46
|
function toArr(any) {
|
47
47
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
@@ -758,7 +758,7 @@ cli
|
|
758
758
|
filterDuplicateOptions(options);
|
759
759
|
// output structure is preserved even after bundling so require()
|
760
760
|
// is ok here
|
761
|
-
const { createServer } = await import('./chunks/dep-
|
761
|
+
const { createServer } = await import('./chunks/dep-jalgWsWD.js').then(function (n) { return n.C; });
|
762
762
|
try {
|
763
763
|
const server = await createServer({
|
764
764
|
root,
|
@@ -838,7 +838,7 @@ cli
|
|
838
838
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
839
839
|
.action(async (root, options) => {
|
840
840
|
filterDuplicateOptions(options);
|
841
|
-
const { build } = await import('./chunks/dep-
|
841
|
+
const { build } = await import('./chunks/dep-jalgWsWD.js').then(function (n) { return n.D; });
|
842
842
|
const buildOptions = cleanOptions(options);
|
843
843
|
try {
|
844
844
|
await build({
|
@@ -866,7 +866,7 @@ cli
|
|
866
866
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
867
867
|
.action(async (root, options) => {
|
868
868
|
filterDuplicateOptions(options);
|
869
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
869
|
+
const { optimizeDeps } = await import('./chunks/dep-jalgWsWD.js').then(function (n) { return n.B; });
|
870
870
|
try {
|
871
871
|
const config = await resolveConfig({
|
872
872
|
root,
|
@@ -892,7 +892,7 @@ cli
|
|
892
892
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
893
893
|
.action(async (root, options) => {
|
894
894
|
filterDuplicateOptions(options);
|
895
|
-
const { preview } = await import('./chunks/dep-
|
895
|
+
const { preview } = await import('./chunks/dep-jalgWsWD.js').then(function (n) { return n.E; });
|
896
896
|
try {
|
897
897
|
const server = await preview({
|
898
898
|
root,
|
package/dist/node/index.d.ts
CHANGED
@@ -823,6 +823,7 @@ declare class ModuleGraph {
|
|
823
823
|
private resolveId;
|
824
824
|
urlToModuleMap: Map<string, ModuleNode>;
|
825
825
|
idToModuleMap: Map<string, ModuleNode>;
|
826
|
+
etagToModuleMap: Map<string, ModuleNode>;
|
826
827
|
fileToModulesMap: Map<string, Set<ModuleNode>>;
|
827
828
|
safeModulesPath: Set<string>;
|
828
829
|
constructor(resolveId: (url: string, ssr: boolean) => Promise<PartialResolvedId | null>);
|
@@ -846,6 +847,8 @@ declare class ModuleGraph {
|
|
846
847
|
ensureEntryFromUrl(rawUrl: string, ssr?: boolean, setIsSelfAccepting?: boolean): Promise<ModuleNode>;
|
847
848
|
createFileOnlyEntry(file: string): ModuleNode;
|
848
849
|
resolveUrl(url: string, ssr?: boolean): Promise<ResolvedUrl>;
|
850
|
+
updateModuleTransformResult(mod: ModuleNode, result: TransformResult | null, ssr: boolean): void;
|
851
|
+
getModuleByEtag(etag: string): ModuleNode | undefined;
|
849
852
|
}
|
850
853
|
|
851
854
|
/**
|
@@ -1757,7 +1760,7 @@ declare function createServer(inlineConfig?: InlineConfig): Promise<ViteDevServe
|
|
1757
1760
|
type PackageCache = Map<string, PackageData>;
|
1758
1761
|
interface PackageData {
|
1759
1762
|
dir: string;
|
1760
|
-
hasSideEffects: (id: string) => boolean | 'no-treeshake';
|
1763
|
+
hasSideEffects: (id: string) => boolean | 'no-treeshake' | null;
|
1761
1764
|
webResolvedImports: Record<string, string | undefined>;
|
1762
1765
|
nodeResolvedImports: Record<string, string | undefined>;
|
1763
1766
|
setResolvedCache: (key: string, entry: string, targetWeb: boolean) => void;
|
@@ -2827,7 +2830,21 @@ interface CSSOptions {
|
|
2827
2830
|
* https://github.com/css-modules/postcss-modules
|
2828
2831
|
*/
|
2829
2832
|
modules?: CSSModulesOptions | false;
|
2833
|
+
/**
|
2834
|
+
* Options for preprocessors.
|
2835
|
+
*
|
2836
|
+
* In addition to options specific to each processors, Vite supports `additionalData` option.
|
2837
|
+
* The `additionalData` option can be used to inject extra code for each style content.
|
2838
|
+
*/
|
2830
2839
|
preprocessorOptions?: Record<string, any>;
|
2840
|
+
/**
|
2841
|
+
* If this option is set, preprocessors will run in workers when possible.
|
2842
|
+
* `true` means the number of CPUs minus 1.
|
2843
|
+
*
|
2844
|
+
* @default 0
|
2845
|
+
* @experimental
|
2846
|
+
*/
|
2847
|
+
preprocessorMaxWorkers?: number | true;
|
2831
2848
|
postcss?: string | (PostCSS.ProcessOptions & {
|
2832
2849
|
plugins?: PostCSS.AcceptedPlugin[];
|
2833
2850
|
});
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { i as isInNodeModules, a as arraify } from './chunks/dep-
|
3
|
-
export { b as build, g as buildErrorMessage, j as createFilter, q as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, v as isFileServingAllowed, l as loadConfigFromFile, w as loadEnv, h as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, x as resolveEnvPrefix, u as searchForWorkspaceRoot, k as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, a as arraify } from './chunks/dep-jalgWsWD.js';
|
3
|
+
export { b as build, g as buildErrorMessage, j as createFilter, q as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, v as isFileServingAllowed, l as loadConfigFromFile, w as loadEnv, h as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, x as resolveEnvPrefix, u as searchForWorkspaceRoot, k as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-jalgWsWD.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';
|
@@ -33,6 +33,7 @@ import 'crypto';
|
|
33
33
|
import 'module';
|
34
34
|
import 'node:assert';
|
35
35
|
import 'node:v8';
|
36
|
+
import 'node:worker_threads';
|
36
37
|
import 'node:buffer';
|
37
38
|
import 'querystring';
|
38
39
|
import 'node:readline';
|
@@ -42,7 +43,6 @@ import 'buffer';
|
|
42
43
|
import 'https';
|
43
44
|
import 'tls';
|
44
45
|
import 'node:zlib';
|
45
|
-
import 'worker_threads';
|
46
46
|
|
47
47
|
// This file will be built for both ESM and CJS. Avoid relying on other modules as possible.
|
48
48
|
// copy from constants.ts
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "5.1.0-beta.
|
3
|
+
"version": "5.1.0-beta.3",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -83,6 +83,7 @@
|
|
83
83
|
"@types/pnpapi": "^0.0.5",
|
84
84
|
"acorn": "^8.11.3",
|
85
85
|
"acorn-walk": "^8.3.2",
|
86
|
+
"artichokie": "^0.2.0",
|
86
87
|
"cac": "^6.7.14",
|
87
88
|
"chokidar": "^3.5.3",
|
88
89
|
"connect": "^3.7.0",
|
@@ -105,7 +106,6 @@
|
|
105
106
|
"micromatch": "^4.0.5",
|
106
107
|
"mlly": "^1.5.0",
|
107
108
|
"mrmime": "^2.0.0",
|
108
|
-
"okie": "^1.0.1",
|
109
109
|
"open": "^8.4.2",
|
110
110
|
"parse5": "^7.1.2",
|
111
111
|
"periscopic": "^4.0.2",
|