@rsbuild/core 0.7.0-beta.8 → 0.7.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.
- package/compiled/connect/index.d.ts +90 -0
- package/compiled/connect/index.js +2427 -0
- package/compiled/connect/license +25 -0
- package/compiled/connect/package.json +1 -0
- package/compiled/css-loader/index.js +20 -20
- package/compiled/postcss-load-config/index.js +10 -10
- package/compiled/postcss-loader/index.js +10 -10
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/client/hmr.js +17 -0
- package/dist/index.cjs +5013 -4956
- package/dist/index.js +5118 -5067
- package/dist-types/cli/init.d.ts +1 -1
- package/dist-types/createContext.d.ts +2 -2
- package/dist-types/createRsbuild.d.ts +5 -1
- package/dist-types/index.d.ts +2 -2
- package/dist-types/internal.d.ts +1 -4
- package/dist-types/provider/initConfigs.d.ts +2 -2
- package/dist-types/provider/provider.d.ts +1 -1
- package/dist-types/server/compilerDevMiddleware.d.ts +1 -1
- package/dist-types/server/devServer.d.ts +44 -1
- package/dist-types/server/getDevMiddlewares.d.ts +2 -1
- package/dist-types/server/helper.d.ts +15 -0
- package/dist-types/server/httpServer.d.ts +6 -5
- package/dist-types/server/middlewares.d.ts +1 -1
- package/dist-types/server/prodServer.d.ts +8 -5
- package/dist-types/server/proxy.d.ts +2 -1
- package/dist-types/server/socketServer.d.ts +3 -3
- package/dist-types/types.d.ts +56 -1
- package/package.json +6 -4
- package/dist-types/plugins/index.d.ts +0 -29
package/dist-types/cli/init.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import type { CommonOptions } from './commands';
|
|
|
2
2
|
export declare function init({ cliOptions, isRestart, }: {
|
|
3
3
|
cliOptions?: CommonOptions;
|
|
4
4
|
isRestart?: boolean;
|
|
5
|
-
}): Promise<import("
|
|
5
|
+
}): Promise<import("..").RsbuildInstance | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type BundlerType, type
|
|
2
|
-
import type { InternalContext } from './types';
|
|
1
|
+
import { type BundlerType, type RsbuildContext } from '@rsbuild/shared';
|
|
2
|
+
import type { CreateRsbuildOptions, InternalContext, NormalizedConfig, RsbuildConfig } from './types';
|
|
3
3
|
export declare function updateContextByNormalizedConfig(context: RsbuildContext, config: NormalizedConfig): void;
|
|
4
4
|
export declare function createPublicContext(context: RsbuildContext): Readonly<RsbuildContext>;
|
|
5
5
|
/**
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CreateRsbuildOptions, RsbuildConfig, RsbuildInstance } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Omit unused keys from Rsbuild config passed by user
|
|
4
|
+
*/
|
|
5
|
+
export declare const pickRsbuildConfig: (rsbuildConfig: RsbuildConfig) => RsbuildConfig;
|
|
2
6
|
export declare function createRsbuild(options?: CreateRsbuildOptions): Promise<RsbuildInstance>;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export type { Rspack };
|
|
|
14
14
|
export { logger } from '@rsbuild/shared';
|
|
15
15
|
export { mergeRsbuildConfig } from './mergeConfig';
|
|
16
16
|
export { PLUGIN_SWC_NAME, PLUGIN_CSS_NAME } from './constants';
|
|
17
|
-
export type { RsbuildConfig, DevConfig, HtmlConfig, ToolsConfig, SourceConfig, ServerConfig, OutputConfig, SecurityConfig, PerformanceConfig, ModuleFederationConfig, NormalizedConfig, NormalizedDevConfig, NormalizedHtmlConfig, NormalizedToolsConfig, NormalizedSourceConfig, NormalizedServerConfig, NormalizedOutputConfig, NormalizedSecurityConfig, NormalizedPerformanceConfig, NormalizedModuleFederationConfig, RsbuildPlugin, RsbuildPlugins, RsbuildPluginAPI, } from './types';
|
|
18
|
-
export type { RsbuildMode, RsbuildEntry, RsbuildTarget, RsbuildContext,
|
|
17
|
+
export type { RsbuildConfig, DevConfig, HtmlConfig, ToolsConfig, SourceConfig, ServerConfig, OutputConfig, SecurityConfig, PerformanceConfig, ModuleFederationConfig, NormalizedConfig, NormalizedDevConfig, NormalizedHtmlConfig, NormalizedToolsConfig, NormalizedSourceConfig, NormalizedServerConfig, NormalizedOutputConfig, NormalizedSecurityConfig, NormalizedPerformanceConfig, NormalizedModuleFederationConfig, RsbuildPlugin, RsbuildPlugins, RsbuildPluginAPI, RsbuildInstance, RsbuildProvider, CreateRsbuildOptions, } from './types';
|
|
18
|
+
export type { RsbuildMode, RsbuildEntry, RsbuildTarget, RsbuildContext, InspectConfigOptions, Minify, Polyfill, PrintUrls, PublicDir, Decorators, RspackRule, WatchFiles, CSSModules, CrossOrigin, ConsoleType, SplitChunks, BundlerChain, ClientConfig, ScriptInject, ChainedConfig, PostCSSPlugin, ScriptLoading, LegalComments, AliasStrategy, FilenameConfig, DistPathConfig, OutputStructure, ChainIdentifier, PreconnectOption, CSSLoaderOptions, ModifyChainUtils, StyleLoaderOptions, PostCSSLoaderOptions, ChainedConfigWithUtils, ModifyRspackConfigUtils, CSSModulesLocalsConvention, OnExitFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnBeforeCreateCompilerFn, OnCloseDevServerFn, OnDevCompileDoneFn, ModifyBundlerChainFn, ModifyRspackConfigFn, ModifyRsbuildConfigFn, TransformFn, TransformHandler, } from '@rsbuild/shared';
|
|
19
19
|
export {
|
|
20
20
|
/**
|
|
21
21
|
* @private
|
package/dist-types/internal.d.ts
CHANGED
|
@@ -5,17 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { runCli } from './cli/commands';
|
|
7
7
|
export { prepareCli } from './cli/prepare';
|
|
8
|
-
export { createContext, createPublicContext } from './createContext';
|
|
9
8
|
export { initPlugins, createPluginManager } from './pluginManager';
|
|
10
9
|
export { initHooks, type Hooks } from './initHooks';
|
|
11
10
|
export { initRsbuildConfig } from './provider/initConfigs';
|
|
12
|
-
export { getPluginAPI } from './initPlugins';
|
|
13
11
|
export type { InternalContext } from './types';
|
|
14
|
-
export { setHTMLPlugin, getHTMLPlugin
|
|
12
|
+
export { setHTMLPlugin, getHTMLPlugin } from './pluginHelper';
|
|
15
13
|
export { formatStats, getStatsOptions } from './helpers';
|
|
16
14
|
export { getChainUtils } from './provider/rspackConfig';
|
|
17
15
|
export { applySwcDecoratorConfig } from './plugins/swc';
|
|
18
16
|
export { getSwcMinimizerOptions } from './plugins/minimize';
|
|
19
17
|
export { getDevMiddleware } from './server/devMiddleware';
|
|
20
18
|
export { createDevServer, startProdServer } from './server';
|
|
21
|
-
export { plugins } from './plugins';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { InternalContext, NormalizedConfig } from '../types';
|
|
1
|
+
import { type PluginManager, type RspackConfig } from '@rsbuild/shared';
|
|
2
|
+
import type { CreateRsbuildOptions, InternalContext, NormalizedConfig } from '../types';
|
|
3
3
|
export type InitConfigsOptions = {
|
|
4
4
|
context: InternalContext;
|
|
5
5
|
pluginManager: PluginManager;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RsbuildProvider } from '../types';
|
|
2
2
|
export declare const rspackProvider: RsbuildProvider;
|
|
@@ -23,7 +23,7 @@ export declare class CompilerDevMiddleware {
|
|
|
23
23
|
private publicPaths;
|
|
24
24
|
private socketServer;
|
|
25
25
|
constructor({ dev, server, devMiddleware, publicPaths }: Options);
|
|
26
|
-
init(): void
|
|
26
|
+
init(): Promise<void>;
|
|
27
27
|
upgrade(req: IncomingMessage, sock: Socket, head: any): void;
|
|
28
28
|
close(): void;
|
|
29
29
|
sockWrite(type: string, data?: Record<string, any> | string | boolean): void;
|
|
@@ -1,6 +1,49 @@
|
|
|
1
|
-
import { type CreateDevServerOptions, type
|
|
1
|
+
import { type CreateDevServerOptions, type StartDevServerOptions } from '@rsbuild/shared';
|
|
2
|
+
import type Connect from '../../compiled/connect/index.js';
|
|
2
3
|
import type { CreateDevMiddlewareReturns } from '../provider/createCompiler';
|
|
3
4
|
import type { InternalContext, NormalizedConfig } from '../types';
|
|
5
|
+
import { type UpgradeEvent } from './helper';
|
|
6
|
+
export type RsbuildDevServer = {
|
|
7
|
+
/**
|
|
8
|
+
* Use rsbuild inner server to listen
|
|
9
|
+
*/
|
|
10
|
+
listen: () => Promise<{
|
|
11
|
+
port: number;
|
|
12
|
+
urls: string[];
|
|
13
|
+
server: {
|
|
14
|
+
close: () => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
/** The following APIs will be used when you use a custom server */
|
|
18
|
+
/**
|
|
19
|
+
* The resolved port.
|
|
20
|
+
*
|
|
21
|
+
* By default, Rsbuild Server listens on port `3000` and automatically increments the port number when the port is occupied.
|
|
22
|
+
*/
|
|
23
|
+
port: number;
|
|
24
|
+
/**
|
|
25
|
+
* connect app instance.
|
|
26
|
+
*
|
|
27
|
+
* Can be used to attach custom middlewares to the dev server.
|
|
28
|
+
*/
|
|
29
|
+
middlewares: Connect.Server;
|
|
30
|
+
/**
|
|
31
|
+
* Notify Rsbuild Server has started
|
|
32
|
+
*
|
|
33
|
+
* In Rsbuild, we will trigger onAfterStartDevServer hook in this stage
|
|
34
|
+
*/
|
|
35
|
+
afterListen: () => Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Subscribe http upgrade event
|
|
38
|
+
*
|
|
39
|
+
* It will used when you use custom server
|
|
40
|
+
*/
|
|
41
|
+
onHTTPUpgrade: UpgradeEvent;
|
|
42
|
+
/**
|
|
43
|
+
* Close the Rsbuild server.
|
|
44
|
+
*/
|
|
45
|
+
close: () => Promise<void>;
|
|
46
|
+
};
|
|
4
47
|
export declare function createDevServer<Options extends {
|
|
5
48
|
context: InternalContext;
|
|
6
49
|
}>(options: Options, createDevMiddleware: (options: Options, compiler: StartDevServerOptions['compiler']) => Promise<CreateDevMiddlewareReturns>, config: NormalizedConfig, { compiler: customCompiler, getPortSilently, runCompile, }?: CreateDevServerOptions): Promise<RsbuildDevServer>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DevConfig, RequestHandler, Rspack, ServerAPIs, ServerConfig
|
|
1
|
+
import type { DevConfig, RequestHandler, Rspack, ServerAPIs, ServerConfig } from '@rsbuild/shared';
|
|
2
|
+
import type { UpgradeEvent } from './helper';
|
|
2
3
|
export type CompileMiddlewareAPI = {
|
|
3
4
|
middleware: RequestHandler;
|
|
4
5
|
sockWrite: ServerAPIs['sockWrite'];
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { IncomingMessage } from 'node:http';
|
|
4
|
+
import type { Socket } from 'node:net';
|
|
1
5
|
import type { DevConfig, NormalizedConfig, OutputStructure, PrintUrls, Routes, RsbuildEntry } from '@rsbuild/shared';
|
|
6
|
+
/**
|
|
7
|
+
* It used to subscribe http upgrade event
|
|
8
|
+
*/
|
|
9
|
+
export type UpgradeEvent = (req: IncomingMessage, socket: Socket, head: any) => void;
|
|
10
|
+
export type StartServerResult = {
|
|
11
|
+
urls: string[];
|
|
12
|
+
port: number;
|
|
13
|
+
server: {
|
|
14
|
+
close: () => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
2
17
|
export declare const formatRoutes: (entry: RsbuildEntry, prefix: string | undefined, outputStructure: OutputStructure | undefined) => Routes;
|
|
3
18
|
export declare function printServerURLs({ urls: originalUrls, port, routes, protocol, printUrls, }: {
|
|
4
19
|
urls: Array<{
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
3
4
|
import type { ServerConfig } from '@rsbuild/shared';
|
|
4
|
-
import type
|
|
5
|
-
export declare const createHttpServer: (
|
|
6
|
-
|
|
7
|
-
middlewares:
|
|
8
|
-
}) => Promise<import("https").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse
|
|
5
|
+
import type Connect from '../../compiled/connect/index.js';
|
|
6
|
+
export declare const createHttpServer: ({ serverConfig, middlewares, }: {
|
|
7
|
+
serverConfig: ServerConfig;
|
|
8
|
+
middlewares: Connect.Server;
|
|
9
|
+
}) => Promise<import("https").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | import("http2").Http2SecureServer>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HtmlFallback, type RequestHandler as Middleware, type Rspack } from '@rsbuild/shared';
|
|
2
|
-
import type Connect from '
|
|
2
|
+
import type Connect from '../../compiled/connect/index.js';
|
|
3
3
|
export declare const faviconFallbackMiddleware: Middleware;
|
|
4
4
|
export declare const getRequestLoggerMiddleware: () => Promise<Connect.NextHandleFunction>;
|
|
5
5
|
export declare const notFoundMiddleware: Middleware;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
import type { Server } from 'node:http';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
4
|
+
import type { Http2SecureServer } from 'node:http2';
|
|
5
|
+
import { type PreviewServerOptions, type ServerConfig } from '@rsbuild/shared';
|
|
6
|
+
import type Connect from '../../compiled/connect/index.js';
|
|
5
7
|
import type { InternalContext, NormalizedConfig } from '../types';
|
|
8
|
+
import { type StartServerResult } from './helper';
|
|
6
9
|
type RsbuildProdServerOptions = {
|
|
7
10
|
pwd: string;
|
|
8
11
|
output: {
|
|
@@ -14,9 +17,9 @@ type RsbuildProdServerOptions = {
|
|
|
14
17
|
export declare class RsbuildProdServer {
|
|
15
18
|
private app;
|
|
16
19
|
private options;
|
|
17
|
-
middlewares:
|
|
18
|
-
constructor(options: RsbuildProdServerOptions);
|
|
19
|
-
onInit(app: Server): Promise<void>;
|
|
20
|
+
middlewares: Connect.Server;
|
|
21
|
+
constructor(options: RsbuildProdServerOptions, middlewares: Connect.Server);
|
|
22
|
+
onInit(app: Server | Http2SecureServer): Promise<void>;
|
|
20
23
|
private applyDefaultMiddlewares;
|
|
21
24
|
private applyStaticAssetMiddleware;
|
|
22
25
|
close(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type RequestHandler as Middleware, type ProxyDetail, type ProxyOptions
|
|
1
|
+
import { type RequestHandler as Middleware, type ProxyDetail, type ProxyOptions } from '@rsbuild/shared';
|
|
2
|
+
import type { UpgradeEvent } from './helper';
|
|
2
3
|
export declare function formatProxyOptions(proxyOptions: ProxyOptions): ProxyDetail[];
|
|
3
4
|
export declare const createProxyMiddleware: (proxyOptions: ProxyOptions) => {
|
|
4
5
|
middlewares: Middleware[];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { IncomingMessage } from 'node:http';
|
|
4
4
|
import type { Socket } from 'node:net';
|
|
5
5
|
import { type DevConfig, type Stats } from '@rsbuild/shared';
|
|
6
|
-
import
|
|
6
|
+
import type Ws from '../../compiled/ws/index.js';
|
|
7
7
|
export declare class SocketServer {
|
|
8
8
|
private wsServer;
|
|
9
9
|
private readonly sockets;
|
|
@@ -12,10 +12,10 @@ export declare class SocketServer {
|
|
|
12
12
|
private timer;
|
|
13
13
|
constructor(options: DevConfig);
|
|
14
14
|
upgrade(req: IncomingMessage, sock: Socket, head: any): void;
|
|
15
|
-
prepare(): void
|
|
15
|
+
prepare(): Promise<void>;
|
|
16
16
|
updateStats(stats: Stats): void;
|
|
17
17
|
sockWrite(type: string, data?: Record<string, any> | string | boolean): void;
|
|
18
|
-
singleWrite(socket:
|
|
18
|
+
singleWrite(socket: Ws, type: string, data?: Record<string, any> | string | boolean): void;
|
|
19
19
|
close(): void;
|
|
20
20
|
private onConnect;
|
|
21
21
|
private getStats;
|
package/dist-types/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { NormalizedConfig, RsbuildConfig, RsbuildContext, RsbuildPlugin, RsbuildPluginAPI, RsbuildPlugins, TransformHandler } from '@rsbuild/shared';
|
|
1
|
+
import type { BuildOptions, Bundler, CreateCompiler, CreateDevServerOptions, InspectConfigOptions, InspectConfigResult, NormalizedConfig, PluginManager, PreviewServerOptions, RsbuildConfig, RsbuildContext, RsbuildPlugin, RsbuildPluginAPI, RsbuildPlugins, RspackConfig, StartDevServerOptions, TransformHandler, WebpackConfig } from '@rsbuild/shared';
|
|
2
2
|
import type { Hooks } from './initHooks';
|
|
3
|
+
import type { RsbuildDevServer } from './server/devServer';
|
|
4
|
+
import type { StartServerResult } from './server/helper';
|
|
3
5
|
declare module '@rspack/core' {
|
|
4
6
|
interface Compiler {
|
|
5
7
|
__rsbuildTransformer?: Record<string, TransformHandler>;
|
|
@@ -28,4 +30,57 @@ export type InternalContext = RsbuildContext & {
|
|
|
28
30
|
/** The plugin API. */
|
|
29
31
|
pluginAPI?: RsbuildPluginAPI;
|
|
30
32
|
};
|
|
33
|
+
export type CreateRsbuildOptions = {
|
|
34
|
+
/** The root path of current project. */
|
|
35
|
+
cwd?: string;
|
|
36
|
+
/** Configurations of Rsbuild. */
|
|
37
|
+
rsbuildConfig?: RsbuildConfig;
|
|
38
|
+
};
|
|
39
|
+
export type ProviderInstance<B extends 'rspack' | 'webpack' = 'rspack'> = {
|
|
40
|
+
readonly bundler: Bundler;
|
|
41
|
+
createCompiler: CreateCompiler;
|
|
42
|
+
/**
|
|
43
|
+
* It is designed for high-level frameworks that require a custom server
|
|
44
|
+
*/
|
|
45
|
+
createDevServer: (options?: CreateDevServerOptions) => Promise<RsbuildDevServer>;
|
|
46
|
+
startDevServer: (options?: StartDevServerOptions) => Promise<StartServerResult>;
|
|
47
|
+
preview: (options?: PreviewServerOptions) => Promise<StartServerResult>;
|
|
48
|
+
build: (options?: BuildOptions) => Promise<void>;
|
|
49
|
+
initConfigs: () => Promise<B extends 'rspack' ? RspackConfig[] : WebpackConfig[]>;
|
|
50
|
+
inspectConfig: (options?: InspectConfigOptions) => Promise<InspectConfigResult<B>>;
|
|
51
|
+
};
|
|
52
|
+
export type RsbuildProvider<B extends 'rspack' | 'webpack' = 'rspack'> = (options: {
|
|
53
|
+
context: InternalContext;
|
|
54
|
+
pluginManager: PluginManager;
|
|
55
|
+
rsbuildOptions: Required<CreateRsbuildOptions>;
|
|
56
|
+
setCssExtractPlugin: (plugin: unknown) => void;
|
|
57
|
+
}) => Promise<ProviderInstance<B>>;
|
|
58
|
+
export type RsbuildInstance = {
|
|
59
|
+
context: RsbuildContext;
|
|
60
|
+
addPlugins: PluginManager['addPlugins'];
|
|
61
|
+
getPlugins: PluginManager['getPlugins'];
|
|
62
|
+
removePlugins: PluginManager['removePlugins'];
|
|
63
|
+
isPluginExists: PluginManager['isPluginExists'];
|
|
64
|
+
build: ProviderInstance['build'];
|
|
65
|
+
preview: ProviderInstance['preview'];
|
|
66
|
+
initConfigs: ProviderInstance['initConfigs'];
|
|
67
|
+
inspectConfig: ProviderInstance['inspectConfig'];
|
|
68
|
+
createCompiler: ProviderInstance['createCompiler'];
|
|
69
|
+
createDevServer: ProviderInstance['createDevServer'];
|
|
70
|
+
startDevServer: ProviderInstance['startDevServer'];
|
|
71
|
+
getHTMLPaths: RsbuildPluginAPI['getHTMLPaths'];
|
|
72
|
+
getRsbuildConfig: RsbuildPluginAPI['getRsbuildConfig'];
|
|
73
|
+
getNormalizedConfig: RsbuildPluginAPI['getNormalizedConfig'];
|
|
74
|
+
onBeforeBuild: RsbuildPluginAPI['onBeforeBuild'];
|
|
75
|
+
onBeforeCreateCompiler: RsbuildPluginAPI['onBeforeCreateCompiler'];
|
|
76
|
+
onBeforeStartDevServer: RsbuildPluginAPI['onBeforeStartDevServer'];
|
|
77
|
+
onBeforeStartProdServer: RsbuildPluginAPI['onBeforeStartProdServer'];
|
|
78
|
+
onAfterBuild: RsbuildPluginAPI['onAfterBuild'];
|
|
79
|
+
onAfterCreateCompiler: RsbuildPluginAPI['onAfterCreateCompiler'];
|
|
80
|
+
onAfterStartDevServer: RsbuildPluginAPI['onAfterStartDevServer'];
|
|
81
|
+
onAfterStartProdServer: RsbuildPluginAPI['onAfterStartProdServer'];
|
|
82
|
+
onCloseDevServer: RsbuildPluginAPI['onCloseDevServer'];
|
|
83
|
+
onDevCompileDone: RsbuildPluginAPI['onDevCompileDone'];
|
|
84
|
+
onExit: RsbuildPluginAPI['onExit'];
|
|
85
|
+
};
|
|
31
86
|
export type { RsbuildConfig, NormalizedConfig, DevConfig, HtmlConfig, ToolsConfig, SourceConfig, ServerConfig, OutputConfig, SecurityConfig, PerformanceConfig, ModuleFederationConfig, NormalizedDevConfig, NormalizedHtmlConfig, NormalizedToolsConfig, NormalizedSourceConfig, NormalizedServerConfig, NormalizedOutputConfig, NormalizedSecurityConfig, NormalizedPerformanceConfig, NormalizedModuleFederationConfig, } from '@rsbuild/shared';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "0.7.0
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,26 +46,28 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "0.7.0
|
|
49
|
+
"@rspack/core": "0.7.0",
|
|
50
50
|
"@swc/helpers": "0.5.3",
|
|
51
51
|
"core-js": "~3.36.0",
|
|
52
52
|
"html-webpack-plugin": "npm:html-rspack-plugin@5.7.2",
|
|
53
53
|
"postcss": "^8.4.38",
|
|
54
|
-
"@rsbuild/shared": "0.7.0
|
|
54
|
+
"@rsbuild/shared": "0.7.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
+
"@types/connect": "3.4.38",
|
|
57
58
|
"@types/fs-extra": "^11.0.4",
|
|
58
59
|
"@types/node": "18.x",
|
|
59
60
|
"@types/on-finished": "2.3.4",
|
|
60
61
|
"@types/ws": "^8.5.10",
|
|
61
62
|
"commander": "^12.1.0",
|
|
63
|
+
"connect": "3.7.0",
|
|
62
64
|
"connect-history-api-fallback": "^2.0.0",
|
|
63
65
|
"css-loader": "7.1.1",
|
|
64
66
|
"dotenv": "16.4.5",
|
|
65
67
|
"dotenv-expand": "11.0.6",
|
|
68
|
+
"fs-extra": "^11.2.0",
|
|
66
69
|
"http-compression": "1.0.20",
|
|
67
70
|
"launch-editor-middleware": "^2.6.1",
|
|
68
|
-
"fs-extra": "^11.2.0",
|
|
69
71
|
"on-finished": "2.4.1",
|
|
70
72
|
"open": "^8.4.0",
|
|
71
73
|
"postcss-load-config": "5.1.0",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { ModifyHTMLTagsFn } from '@rsbuild/shared';
|
|
2
|
-
export declare const plugins: {
|
|
3
|
-
basic: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
4
|
-
html: (modifyTagsFn: ModifyHTMLTagsFn) => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
5
|
-
output: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
6
|
-
resolve: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
7
|
-
cleanOutput: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
8
|
-
startUrl: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
9
|
-
fileSize: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
10
|
-
target: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
11
|
-
entry: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
12
|
-
cache: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
13
|
-
splitChunks: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
14
|
-
inlineChunk: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
15
|
-
bundleAnalyzer: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
16
|
-
rsdoctor: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
17
|
-
asset: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
18
|
-
wasm: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
19
|
-
moment: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
20
|
-
nodeAddons: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
21
|
-
externals: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
22
|
-
resourceHints: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
23
|
-
performance: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
24
|
-
define: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
25
|
-
css: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
26
|
-
server: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
27
|
-
moduleFederation: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
28
|
-
manifest: () => Promise<import("@rsbuild/shared").RsbuildPlugin>;
|
|
29
|
-
};
|