vite 2.7.3 → 2.7.4
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/CHANGELOG.md +11 -0
- package/LICENSE.md +41 -11
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/build.d.ts +6 -6
- package/dist/node/chunks/{dep-58399509.js → dep-2d8e2cb1.js} +1 -1
- package/dist/node/chunks/dep-2d8e2cb1.js.map +1 -0
- package/dist/node/chunks/{dep-df937e9b.js → dep-a89a79de.js} +2 -2
- package/dist/node/chunks/{dep-df937e9b.js.map → dep-a89a79de.js.map} +1 -1
- package/dist/node/chunks/{dep-5496817b.js → dep-cb6d7f22.js} +466 -144
- package/dist/node/chunks/dep-cb6d7f22.js.map +1 -0
- package/dist/node/chunks/{dep-66abeb03.js → dep-ef3cdce0.js} +79 -61
- package/dist/node/chunks/dep-ef3cdce0.js.map +1 -0
- package/dist/node/chunks/{dep-cf2decec.js → dep-fd7e14cf.js} +2 -2
- package/dist/node/chunks/dep-fd7e14cf.js.map +1 -0
- package/dist/node/cli.js +4 -4
- package/dist/node/cli.js.map +1 -1
- package/dist/node/config.d.ts +14 -14
- package/dist/node/http.d.ts +5 -5
- package/dist/node/index.d.ts +44 -44
- package/dist/node/index.js +1 -1
- package/dist/node/logger.d.ts +4 -4
- package/dist/node/optimizer/esbuildDepPlugin.d.ts +3 -3
- package/dist/node/optimizer/index.d.ts +2 -2
- package/dist/node/optimizer/registerMissing.d.ts +1 -1
- package/dist/node/optimizer/scan.d.ts +1 -1
- package/dist/node/packages.d.ts +2 -2
- package/dist/node/plugin.d.ts +7 -7
- package/dist/node/plugins/asset.d.ts +3 -3
- package/dist/node/plugins/assetImportMetaUrl.d.ts +2 -2
- package/dist/node/plugins/clientInjections.d.ts +2 -2
- package/dist/node/plugins/css.d.ts +7 -9
- package/dist/node/plugins/dataUri.d.ts +1 -1
- package/dist/node/plugins/define.d.ts +2 -2
- package/dist/node/plugins/esbuild.d.ts +4 -4
- package/dist/node/plugins/html.d.ts +5 -5
- package/dist/node/plugins/importAnalysis.d.ts +2 -2
- package/dist/node/plugins/importAnalysisBuild.d.ts +2 -2
- package/dist/node/plugins/index.d.ts +2 -2
- package/dist/node/plugins/json.d.ts +1 -1
- package/dist/node/plugins/loadFallback.d.ts +1 -1
- package/dist/node/plugins/manifest.d.ts +2 -2
- package/dist/node/plugins/modulePreloadPolyfill.d.ts +2 -2
- package/dist/node/plugins/preAlias.d.ts +1 -1
- package/dist/node/plugins/reporter.d.ts +2 -2
- package/dist/node/plugins/resolve.d.ts +4 -4
- package/dist/node/plugins/ssrRequireHook.d.ts +2 -2
- package/dist/node/plugins/terser.d.ts +2 -2
- package/dist/node/plugins/wasm.d.ts +2 -2
- package/dist/node/plugins/worker.d.ts +2 -2
- package/dist/node/preview.d.ts +4 -4
- package/dist/node/server/hmr.d.ts +3 -3
- package/dist/node/server/index.d.ts +15 -14
- package/dist/node/server/middlewares/base.d.ts +2 -2
- package/dist/node/server/middlewares/error.d.ts +4 -4
- package/dist/node/server/middlewares/indexHtml.d.ts +2 -2
- package/dist/node/server/middlewares/proxy.d.ts +4 -4
- package/dist/node/server/middlewares/spaFallback.d.ts +1 -1
- package/dist/node/server/middlewares/static.d.ts +2 -2
- package/dist/node/server/middlewares/time.d.ts +1 -1
- package/dist/node/server/middlewares/transform.d.ts +2 -2
- package/dist/node/server/moduleGraph.d.ts +2 -2
- package/dist/node/server/openBrowser.d.ts +1 -1
- package/dist/node/server/pluginContainer.d.ts +5 -5
- package/dist/node/server/send.d.ts +2 -2
- package/dist/node/server/sourcemap.d.ts +1 -1
- package/dist/node/server/transformRequest.d.ts +2 -2
- package/dist/node/server/ws.d.ts +5 -5
- package/dist/node/ssr/ssrExternal.d.ts +1 -1
- package/dist/node/ssr/ssrManifestPlugin.d.ts +2 -2
- package/dist/node/ssr/ssrModuleLoader.d.ts +1 -1
- package/dist/node/ssr/ssrStacktrace.d.ts +1 -1
- package/dist/node/ssr/ssrTransform.d.ts +2 -2
- package/dist/node/utils.d.ts +2 -2
- package/package.json +13 -13
- package/src/client/client.ts +2 -2
- package/src/client/overlay.ts +1 -1
- package/types/alias.d.ts +1 -1
- package/types/chokidar.d.ts +2 -2
- package/types/http-proxy.d.ts +4 -4
- package/types/importMeta.d.ts +13 -14
- package/types/shims.d.ts +5 -5
- package/types/ws.d.ts +6 -6
- package/dist/node/chunks/dep-5496817b.js.map +0 -1
- package/dist/node/chunks/dep-58399509.js.map +0 -1
- package/dist/node/chunks/dep-66abeb03.js.map +0 -1
- package/dist/node/chunks/dep-cf2decec.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Plugin } from '../plugin';
|
|
2
|
-
import { ViteDevServer } from '../server';
|
|
3
|
-
import { OutputBundle, OutputChunk } from 'rollup';
|
|
4
|
-
import { ResolvedConfig } from '../config';
|
|
5
|
-
import { AttributeNode, NodeTransform, ElementNode } from '@vue/compiler-dom';
|
|
1
|
+
import type { Plugin } from '../plugin';
|
|
2
|
+
import type { ViteDevServer } from '../server';
|
|
3
|
+
import type { OutputBundle, OutputChunk } from 'rollup';
|
|
4
|
+
import type { ResolvedConfig } from '../config';
|
|
5
|
+
import type { AttributeNode, NodeTransform, ElementNode } from '@vue/compiler-dom';
|
|
6
6
|
export declare const isHTMLProxy: (id: string) => boolean;
|
|
7
7
|
export declare const htmlProxyMap: WeakMap<Readonly<Omit<import("../config").UserConfig, "plugins" | "alias" | "dedupe" | "assetsInclude" | "optimizeDeps"> & {
|
|
8
8
|
configFile: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ResolvedConfig } from '../config';
|
|
2
|
-
import { Plugin } from '../plugin';
|
|
1
|
+
import type { ResolvedConfig } from '../config';
|
|
2
|
+
import type { Plugin } from '../plugin';
|
|
3
3
|
/**
|
|
4
4
|
* A flag for injected helpers. This flag will be set to `false` if the output
|
|
5
5
|
* target is not native es - so that injected helper logic can be conditionally
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ResolvedConfig } from '../config';
|
|
2
|
-
import { Plugin } from '../plugin';
|
|
1
|
+
import type { ResolvedConfig } from '../config';
|
|
2
|
+
import type { Plugin } from '../plugin';
|
|
3
3
|
export declare function resolvePlugins(config: ResolvedConfig, prePlugins: Plugin[], normalPlugins: Plugin[], postPlugins: Plugin[]): Promise<Plugin[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ResolvedConfig } from '..';
|
|
2
|
-
import { Plugin } from '../plugin';
|
|
1
|
+
import type { ResolvedConfig } from '..';
|
|
2
|
+
import type { Plugin } from '../plugin';
|
|
3
3
|
export declare type Manifest = Record<string, ManifestChunk>;
|
|
4
4
|
export interface ManifestChunk {
|
|
5
5
|
src?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResolvedConfig } from '..';
|
|
2
|
-
import { Plugin } from '../plugin';
|
|
1
|
+
import type { ResolvedConfig } from '..';
|
|
2
|
+
import type { Plugin } from '../plugin';
|
|
3
3
|
export declare const modulePreloadPolyfillId = "vite/modulepreload-polyfill";
|
|
4
4
|
export declare function modulePreloadPolyfillPlugin(config: ResolvedConfig): Plugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Plugin } from 'rollup';
|
|
2
|
-
import { ResolvedConfig } from '../config';
|
|
1
|
+
import type { Plugin } from 'rollup';
|
|
2
|
+
import type { ResolvedConfig } from '../config';
|
|
3
3
|
export declare function buildReporterPlugin(config: ResolvedConfig): Plugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Plugin } from '../plugin';
|
|
2
|
-
import { ViteDevServer, SSROptions } from '..';
|
|
3
|
-
import { PartialResolvedId } from 'rollup';
|
|
4
|
-
import { PackageCache, PackageData } from '../packages';
|
|
1
|
+
import type { Plugin } from '../plugin';
|
|
2
|
+
import type { ViteDevServer, SSROptions } from '..';
|
|
3
|
+
import type { PartialResolvedId } from 'rollup';
|
|
4
|
+
import type { PackageCache, PackageData } from '../packages';
|
|
5
5
|
export declare const browserExternalId = "__vite-browser-external";
|
|
6
6
|
export interface ResolveOptions {
|
|
7
7
|
mainFields?: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { ResolvedConfig } from '..';
|
|
3
|
-
import { Plugin } from '../plugin';
|
|
2
|
+
import type { ResolvedConfig } from '..';
|
|
3
|
+
import type { Plugin } from '../plugin';
|
|
4
4
|
/**
|
|
5
5
|
* This plugin hooks into Node's module resolution algorithm at runtime,
|
|
6
6
|
* so that SSR builds can benefit from `resolve.dedupe` like they do
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Plugin } from '../plugin';
|
|
2
|
-
import { ResolvedConfig } from '..';
|
|
1
|
+
import type { Plugin } from '../plugin';
|
|
2
|
+
import type { ResolvedConfig } from '..';
|
|
3
3
|
export declare function terserPlugin(config: ResolvedConfig): Plugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ResolvedConfig } from '../config';
|
|
2
|
-
import { Plugin } from '../plugin';
|
|
1
|
+
import type { ResolvedConfig } from '../config';
|
|
2
|
+
import type { Plugin } from '../plugin';
|
|
3
3
|
export declare const wasmPlugin: (config: ResolvedConfig) => Plugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ResolvedConfig } from '../config';
|
|
2
|
-
import { Plugin } from '../plugin';
|
|
1
|
+
import type { ResolvedConfig } from '../config';
|
|
2
|
+
import type { Plugin } from '../plugin';
|
|
3
3
|
export declare function webWorkerPlugin(config: ResolvedConfig): Plugin;
|
package/dist/node/preview.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Server } from 'http';
|
|
3
|
-
import { InlineConfig, ResolvedConfig } from '.';
|
|
4
|
-
import { ResolvedServerOptions } from './server';
|
|
5
|
-
import { CommonServerOptions } from './http';
|
|
2
|
+
import type { Server } from 'http';
|
|
3
|
+
import type { InlineConfig, ResolvedConfig } from '.';
|
|
4
|
+
import type { ResolvedServerOptions } from './server';
|
|
5
|
+
import type { CommonServerOptions } from './http';
|
|
6
6
|
export interface PreviewOptions extends CommonServerOptions {
|
|
7
7
|
}
|
|
8
8
|
export interface ResolvedPreviewOptions extends PreviewOptions {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { ViteDevServer } from '..';
|
|
3
|
-
import { ModuleNode } from './moduleGraph';
|
|
4
|
-
import { Server } from 'http';
|
|
2
|
+
import type { ViteDevServer } from '..';
|
|
3
|
+
import type { ModuleNode } from './moduleGraph';
|
|
4
|
+
import type { Server } from 'http';
|
|
5
5
|
export declare const debugHmr: (...args: any[]) => any;
|
|
6
6
|
export interface HmrOptions {
|
|
7
7
|
protocol?: string;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import * as http from 'http';
|
|
3
|
-
import { CommonServerOptions } from '../http';
|
|
4
|
-
import { InlineConfig, ResolvedConfig } from '../config';
|
|
5
|
-
import { PluginContainer } from './pluginContainer';
|
|
6
|
-
import { FSWatcher, WatchOptions } from 'types/chokidar';
|
|
7
|
-
import { WebSocketServer } from './ws';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
2
|
+
import type * as http from 'http';
|
|
3
|
+
import type { CommonServerOptions } from '../http';
|
|
4
|
+
import type { InlineConfig, ResolvedConfig } from '../config';
|
|
5
|
+
import type { PluginContainer } from './pluginContainer';
|
|
6
|
+
import type { FSWatcher, WatchOptions } from 'types/chokidar';
|
|
7
|
+
import type { WebSocketServer } from './ws';
|
|
8
|
+
import type { ModuleNode } from './moduleGraph';
|
|
9
|
+
import { ModuleGraph } from './moduleGraph';
|
|
10
|
+
import type { Connect } from 'types/connect';
|
|
11
|
+
import type { HmrOptions } from './hmr';
|
|
12
|
+
import type { TransformOptions, TransformResult } from './transformRequest';
|
|
13
|
+
import type { ESBuildTransformResult } from '../plugins/esbuild';
|
|
14
|
+
import type { TransformOptions as EsbuildTransformOptions } from 'esbuild';
|
|
15
|
+
import type { DepOptimizationMetadata } from '../optimizer';
|
|
16
|
+
import type { SourceMap } from 'rollup';
|
|
16
17
|
export { searchForWorkspaceRoot } from './searchRoot';
|
|
17
18
|
export interface ServerOptions extends CommonServerOptions {
|
|
18
19
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ViteDevServer } from '..';
|
|
2
|
-
import { Connect } from 'types/connect';
|
|
1
|
+
import type { ViteDevServer } from '..';
|
|
2
|
+
import type { Connect } from 'types/connect';
|
|
3
3
|
export declare function baseMiddleware({ config }: ViteDevServer): Connect.NextHandleFunction;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RollupError } from 'rollup';
|
|
2
|
-
import { ViteDevServer } from '../..';
|
|
3
|
-
import { Connect } from 'types/connect';
|
|
4
|
-
import { ErrorPayload } from 'types/hmrPayload';
|
|
1
|
+
import type { RollupError } from 'rollup';
|
|
2
|
+
import type { ViteDevServer } from '../..';
|
|
3
|
+
import type { Connect } from 'types/connect';
|
|
4
|
+
import type { ErrorPayload } from 'types/hmrPayload';
|
|
5
5
|
export declare function prepareError(err: Error | RollupError): ErrorPayload['err'];
|
|
6
6
|
export declare function buildErrorMessage(err: RollupError, args?: string[], includeStack?: boolean): string;
|
|
7
7
|
export declare function logError(server: ViteDevServer, err: RollupError): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Connect } from 'types/connect';
|
|
2
|
-
import { ViteDevServer } from '../..';
|
|
1
|
+
import type { Connect } from 'types/connect';
|
|
2
|
+
import type { ViteDevServer } from '../..';
|
|
3
3
|
export declare function createDevHtmlTransformFn(server: ViteDevServer): (url: string, html: string, originalUrl: string) => Promise<string>;
|
|
4
4
|
export declare function indexHtmlMiddleware(server: ViteDevServer): Connect.NextHandleFunction;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import * as http from 'http';
|
|
3
|
-
import { Connect } from 'types/connect';
|
|
4
|
-
import { HttpProxy } from 'types/http-proxy';
|
|
5
|
-
import { ResolvedConfig } from '../..';
|
|
2
|
+
import type * as http from 'http';
|
|
3
|
+
import type { Connect } from 'types/connect';
|
|
4
|
+
import type { HttpProxy } from 'types/http-proxy';
|
|
5
|
+
import type { ResolvedConfig } from '../..';
|
|
6
6
|
export interface ProxyOptions extends HttpProxy.ServerOptions {
|
|
7
7
|
/**
|
|
8
8
|
* rewrite path
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Connect } from 'types/connect';
|
|
1
|
+
import type { Connect } from 'types/connect';
|
|
2
2
|
export declare function spaFallbackMiddleware(root: string): Connect.NextHandleFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Connect } from 'types/connect';
|
|
2
|
-
import { ViteDevServer } from '../..';
|
|
1
|
+
import type { Connect } from 'types/connect';
|
|
2
|
+
import type { ViteDevServer } from '../..';
|
|
3
3
|
export declare function servePublicMiddleware(dir: string): Connect.NextHandleFunction;
|
|
4
4
|
export declare function serveStaticMiddleware(dir: string, server: ViteDevServer): Connect.NextHandleFunction;
|
|
5
5
|
export declare function serveRawFsMiddleware(server: ViteDevServer): Connect.NextHandleFunction;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Connect } from 'types/connect';
|
|
1
|
+
import type { Connect } from 'types/connect';
|
|
2
2
|
export declare function timeMiddleware(root: string): Connect.NextHandleFunction;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ViteDevServer } from '..';
|
|
2
|
-
import { Connect } from 'types/connect';
|
|
1
|
+
import type { ViteDevServer } from '..';
|
|
2
|
+
import type { Connect } from 'types/connect';
|
|
3
3
|
export declare function transformMiddleware(server: ViteDevServer): Connect.NextHandleFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleInfo, PartialResolvedId } from 'rollup';
|
|
2
|
-
import { TransformResult } from './transformRequest';
|
|
1
|
+
import type { ModuleInfo, PartialResolvedId } from 'rollup';
|
|
2
|
+
import type { TransformResult } from './transformRequest';
|
|
3
3
|
export declare class ModuleNode {
|
|
4
4
|
/**
|
|
5
5
|
* Public served url path, starts with /
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* https://github.com/facebook/create-react-app/blob/master/LICENSE
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
import { Logger } from '../logger';
|
|
10
|
+
import type { Logger } from '../logger';
|
|
11
11
|
/**
|
|
12
12
|
* Reads the BROWSER environment variable and decides what to do with it.
|
|
13
13
|
* Returns true if it opened a browser or ran a node.js script, otherwise false.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* This file is refactored into TypeScript based on
|
|
3
3
|
* https://github.com/preactjs/wmr/blob/main/packages/wmr/src/lib/rollup-plugin-container.js
|
|
4
4
|
*/
|
|
5
|
-
import { Plugin } from '../plugin';
|
|
6
|
-
import { InputOptions, OutputOptions, ModuleInfo, PartialResolvedId, LoadResult, SourceDescription } from 'rollup';
|
|
5
|
+
import type { Plugin } from '../plugin';
|
|
6
|
+
import type { InputOptions, OutputOptions, ModuleInfo, PartialResolvedId, LoadResult, SourceDescription } from 'rollup';
|
|
7
7
|
import * as acorn from 'acorn';
|
|
8
|
-
import { FSWatcher } from 'chokidar';
|
|
9
|
-
import { ResolvedConfig } from '../config';
|
|
10
|
-
import { ModuleGraph } from './moduleGraph';
|
|
8
|
+
import type { FSWatcher } from 'chokidar';
|
|
9
|
+
import type { ResolvedConfig } from '../config';
|
|
10
|
+
import type { ModuleGraph } from './moduleGraph';
|
|
11
11
|
export interface PluginContainerOptions {
|
|
12
12
|
cwd?: string;
|
|
13
13
|
output?: OutputOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import { SourceMap } from 'rollup';
|
|
2
|
+
import type { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
+
import type { SourceMap } from 'rollup';
|
|
4
4
|
export declare function send(req: IncomingMessage, res: ServerResponse, content: string | Buffer, type: string, etag?: string, cacheControl?: string, map?: SourceMap | null): void;
|
package/dist/node/server/ws.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Server } from 'http';
|
|
3
|
-
import { ServerOptions as HttpsServerOptions } from 'https';
|
|
4
|
-
import { WebSocket as WebSocketTypes } from 'types/ws';
|
|
5
|
-
import { HMRPayload } from 'types/hmrPayload';
|
|
6
|
-
import { ResolvedConfig } from '..';
|
|
2
|
+
import type { Server } from 'http';
|
|
3
|
+
import type { ServerOptions as HttpsServerOptions } from 'https';
|
|
4
|
+
import type { WebSocket as WebSocketTypes } from 'types/ws';
|
|
5
|
+
import type { HMRPayload } from 'types/hmrPayload';
|
|
6
|
+
import type { ResolvedConfig } from '..';
|
|
7
7
|
export declare const HMR_HEADER = "vite-hmr";
|
|
8
8
|
export interface WebSocketServer {
|
|
9
9
|
on: WebSocketTypes.Server['on'];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ResolvedConfig } from '..';
|
|
2
|
-
import { Plugin } from '../plugin';
|
|
1
|
+
import type { ResolvedConfig } from '..';
|
|
2
|
+
import type { Plugin } from '../plugin';
|
|
3
3
|
export declare function ssrManifestPlugin(config: ResolvedConfig): Plugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ModuleGraph } from '../server/moduleGraph';
|
|
1
|
+
import type { ModuleGraph } from '../server/moduleGraph';
|
|
2
2
|
export declare function ssrRewriteStacktrace(stack: string, moduleGraph: ModuleGraph): string;
|
|
3
3
|
export declare function rebindErrorStacktrace(e: Error, stacktrace: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SourceMap } from 'rollup';
|
|
2
|
-
import { TransformResult } from '../server/transformRequest';
|
|
1
|
+
import type { SourceMap } from 'rollup';
|
|
2
|
+
import type { TransformResult } from '../server/transformRequest';
|
|
3
3
|
export declare const ssrModuleExportsKey = "__vite_ssr_exports__";
|
|
4
4
|
export declare const ssrImportKey = "__vite_ssr_import__";
|
|
5
5
|
export declare const ssrDynamicImportKey = "__vite_ssr_dynamic_import__";
|
package/dist/node/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import debug from 'debug';
|
|
2
|
-
import { FSWatcher } from 'chokidar';
|
|
3
|
-
import { DecodedSourceMap, RawSourceMap } from '@ampproject/remapping/dist/types/types';
|
|
2
|
+
import type { FSWatcher } from 'chokidar';
|
|
3
|
+
import type { DecodedSourceMap, RawSourceMap } from '@ampproject/remapping/dist/types/types';
|
|
4
4
|
export declare function slash(p: string): string;
|
|
5
5
|
export declare function unwrapId(id: string): string;
|
|
6
6
|
export declare const flattenId: (id: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"build-types": "run-s build-temp-types patch-types roll-types",
|
|
36
36
|
"build-temp-types": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
|
|
37
37
|
"ci-build": "rimraf dist && run-s build-bundle build-types",
|
|
38
|
-
"patch-types": "node scripts/patchTypes.
|
|
38
|
+
"patch-types": "ts-node scripts/patchTypes.ts",
|
|
39
39
|
"roll-types": "api-extractor run && rimraf temp",
|
|
40
40
|
"lint": "eslint --ext .ts src/**",
|
|
41
41
|
"format": "prettier --write --parser typescript \"src/**/*.ts\"",
|
|
42
42
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path .",
|
|
43
|
-
"release": "node ../../scripts/release.
|
|
43
|
+
"release": "ts-node ../../scripts/release.ts"
|
|
44
44
|
},
|
|
45
45
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"esbuild": "^0.13.12",
|
|
48
|
-
"postcss": "^8.
|
|
48
|
+
"postcss": "^8.4.5",
|
|
49
49
|
"resolve": "^1.20.0",
|
|
50
50
|
"rollup": "^2.59.0"
|
|
51
51
|
},
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
"fsevents": "~2.3.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@ampproject/remapping": "^1.0.
|
|
57
|
-
"@babel/parser": "^7.16.
|
|
56
|
+
"@ampproject/remapping": "^1.0.2",
|
|
57
|
+
"@babel/parser": "^7.16.6",
|
|
58
58
|
"@babel/types": "^7.16.0",
|
|
59
59
|
"@rollup/plugin-alias": "^3.1.8",
|
|
60
60
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
61
61
|
"@rollup/plugin-dynamic-import-vars": "^1.4.1",
|
|
62
62
|
"@rollup/plugin-json": "^4.1.0",
|
|
63
|
-
"@rollup/plugin-node-resolve": "13.
|
|
63
|
+
"@rollup/plugin-node-resolve": "13.1.1",
|
|
64
64
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
65
|
-
"@rollup/pluginutils": "^4.1.
|
|
65
|
+
"@rollup/pluginutils": "^4.1.2",
|
|
66
66
|
"@types/convert-source-map": "^1.5.2",
|
|
67
67
|
"@types/debug": "^4.1.7",
|
|
68
68
|
"@types/estree": "^0.0.50",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"@types/less": "^3.0.3",
|
|
71
71
|
"@types/micromatch": "^4.0.2",
|
|
72
72
|
"@types/mime": "^2.0.3",
|
|
73
|
-
"@types/node": "^16.11.
|
|
73
|
+
"@types/node": "^16.11.14",
|
|
74
74
|
"@types/resolve": "^1.20.1",
|
|
75
|
-
"@types/sass": "~1.43.
|
|
75
|
+
"@types/sass": "~1.43.1",
|
|
76
76
|
"@types/stylus": "^0.48.36",
|
|
77
77
|
"@types/ws": "^8.2.2",
|
|
78
|
-
"@vue/compiler-dom": "^3.2.
|
|
78
|
+
"@vue/compiler-dom": "^3.2.26",
|
|
79
79
|
"acorn": "^8.6.0",
|
|
80
80
|
"acorn-class-fields": "^1.0.0",
|
|
81
81
|
"acorn-static-class-features": "^1.0.0",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"connect-history-api-fallback": "^1.6.0",
|
|
88
88
|
"convert-source-map": "^1.8.0",
|
|
89
89
|
"cors": "^2.8.5",
|
|
90
|
-
"debug": "^4.3.
|
|
90
|
+
"debug": "^4.3.3",
|
|
91
91
|
"dotenv": "^10.0.0",
|
|
92
92
|
"dotenv-expand": "^5.1.0",
|
|
93
93
|
"es-module-lexer": "^0.9.3",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"resolve.exports": "^1.1.0",
|
|
110
110
|
"rollup-plugin-license": "^2.6.0",
|
|
111
111
|
"selfsigned": "^1.10.11",
|
|
112
|
-
"sirv": "^1.0.
|
|
112
|
+
"sirv": "^1.0.19",
|
|
113
113
|
"source-map": "^0.6.1",
|
|
114
114
|
"source-map-support": "^0.5.21",
|
|
115
115
|
"strip-ansi": "^6.0.1",
|
package/src/client/client.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
ErrorPayload,
|
|
3
3
|
FullReloadPayload,
|
|
4
4
|
HMRPayload,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Update,
|
|
7
7
|
UpdatePayload
|
|
8
8
|
} from 'types/hmrPayload'
|
|
9
|
-
import { CustomEventName } from 'types/customEvent'
|
|
9
|
+
import type { CustomEventName } from 'types/customEvent'
|
|
10
10
|
import { ErrorOverlay, overlayId } from './overlay'
|
|
11
11
|
// eslint-disable-next-line node/no-missing-import
|
|
12
12
|
import '@vite/env'
|
package/src/client/overlay.ts
CHANGED
package/types/alias.d.ts
CHANGED
package/types/chokidar.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ THE SOFTWARE.
|
|
|
28
28
|
*/
|
|
29
29
|
/// <reference types="node" />
|
|
30
30
|
|
|
31
|
-
import * as fs from 'fs'
|
|
32
|
-
import { Matcher } from './anymatch'
|
|
31
|
+
import type * as fs from 'fs'
|
|
32
|
+
import type { Matcher } from './anymatch'
|
|
33
33
|
|
|
34
34
|
export interface FSWatcher extends fs.FSWatcher {
|
|
35
35
|
options: WatchOptions
|
package/types/http-proxy.d.ts
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
/// <reference types="node" />
|
|
15
15
|
|
|
16
|
-
import * as net from 'net'
|
|
17
|
-
import * as http from 'http'
|
|
16
|
+
import type * as net from 'net'
|
|
17
|
+
import type * as http from 'http'
|
|
18
18
|
import * as events from 'events'
|
|
19
|
-
import * as url from 'url'
|
|
20
|
-
import * as stream from 'stream'
|
|
19
|
+
import type * as url from 'url'
|
|
20
|
+
import type * as stream from 'stream'
|
|
21
21
|
|
|
22
22
|
export namespace HttpProxy {
|
|
23
23
|
export type ProxyTarget = ProxyTargetUrl | ProxyTargetDetailed
|
package/types/importMeta.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import type { CustomEventName } from './customEvent'
|
|
2
|
+
import type {
|
|
3
|
+
ErrorPayload,
|
|
4
|
+
FullReloadPayload,
|
|
5
|
+
PrunePayload,
|
|
6
|
+
UpdatePayload
|
|
7
|
+
} from './hmrPayload'
|
|
8
|
+
|
|
1
9
|
interface ImportMeta {
|
|
2
10
|
url: string
|
|
3
11
|
|
|
@@ -19,24 +27,15 @@ interface ImportMeta {
|
|
|
19
27
|
invalidate(): void
|
|
20
28
|
|
|
21
29
|
on: {
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
cb: (payload: import('./hmrPayload').UpdatePayload) => void
|
|
25
|
-
): void
|
|
26
|
-
(
|
|
27
|
-
event: 'vite:beforePrune',
|
|
28
|
-
cb: (payload: import('./hmrPayload').PrunePayload) => void
|
|
29
|
-
): void
|
|
30
|
+
(event: 'vite:beforeUpdate', cb: (payload: UpdatePayload) => void): void
|
|
31
|
+
(event: 'vite:beforePrune', cb: (payload: PrunePayload) => void): void
|
|
30
32
|
(
|
|
31
33
|
event: 'vite:beforeFullReload',
|
|
32
|
-
cb: (payload:
|
|
33
|
-
): void
|
|
34
|
-
(
|
|
35
|
-
event: 'vite:error',
|
|
36
|
-
cb: (payload: import('./hmrPayload').ErrorPayload) => void
|
|
34
|
+
cb: (payload: FullReloadPayload) => void
|
|
37
35
|
): void
|
|
36
|
+
(event: 'vite:error', cb: (payload: ErrorPayload) => void): void
|
|
38
37
|
<T extends string>(
|
|
39
|
-
event:
|
|
38
|
+
event: CustomEventName<T>,
|
|
40
39
|
cb: (data: any) => void
|
|
41
40
|
): void
|
|
42
41
|
}
|
package/types/shims.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ declare module 'launch-editor-middleware' {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
declare module 'postcss-load-config' {
|
|
41
|
-
import { ProcessOptions, Plugin } from 'postcss'
|
|
41
|
+
import type { ProcessOptions, Plugin } from 'postcss'
|
|
42
42
|
function load(
|
|
43
43
|
inline: any,
|
|
44
44
|
root: string
|
|
@@ -50,7 +50,7 @@ declare module 'postcss-load-config' {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
declare module 'postcss-import' {
|
|
53
|
-
import { Plugin } from 'postcss'
|
|
53
|
+
import type { Plugin } from 'postcss'
|
|
54
54
|
const plugin: (options: {
|
|
55
55
|
resolve: (
|
|
56
56
|
id: string,
|
|
@@ -62,13 +62,13 @@ declare module 'postcss-import' {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
declare module 'postcss-modules' {
|
|
65
|
-
import { Plugin } from 'postcss'
|
|
65
|
+
import type { Plugin } from 'postcss'
|
|
66
66
|
const plugin: (options: any) => Plugin
|
|
67
67
|
export = plugin
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
declare module '@rollup/plugin-dynamic-import-vars' {
|
|
71
|
-
import { Plugin } from 'rollup'
|
|
71
|
+
import type { Plugin } from 'rollup'
|
|
72
72
|
|
|
73
73
|
interface Options {
|
|
74
74
|
include?: string | RegExp | (string | RegExp)[]
|
|
@@ -81,7 +81,7 @@ declare module '@rollup/plugin-dynamic-import-vars' {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
declare module 'rollup-plugin-web-worker-loader' {
|
|
84
|
-
import { Plugin } from 'rollup'
|
|
84
|
+
import type { Plugin } from 'rollup'
|
|
85
85
|
|
|
86
86
|
interface Options {
|
|
87
87
|
targetPlatform?: string
|