@rsbuild/core 1.1.13 → 1.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.
- package/README.md +1 -1
- package/compiled/css-loader/index.js +20 -20
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss-loader/index.js +8 -8
- package/compiled/rsbuild-dev-middleware/index.js +25 -25
- package/compiled/rspack-chain/index.d.ts +1 -0
- package/compiled/rspack-chain/index.js +67 -66
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/compiled/style-loader/index.js +13 -13
- package/dist/client/overlay.js +11 -153
- package/dist/index.cjs +850 -1470
- package/dist/index.js +1073 -1691
- package/dist/transformRawLoader.mjs +1 -1
- package/dist-types/client/hmr.d.ts +1 -1
- package/dist-types/helpers/path.d.ts +2 -0
- package/dist-types/hooks.d.ts +2 -2
- package/dist-types/index.d.ts +1 -8
- package/dist-types/plugins/cleanOutput.d.ts +0 -1
- package/dist-types/rspack/preload/HtmlPreloadOrPrefetchPlugin.d.ts +1 -0
- package/dist-types/server/ansiHTML.d.ts +1 -8
- package/dist-types/server/overlay.d.ts +2 -0
- package/dist-types/server/socketServer.d.ts +7 -5
- package/dist-types/types/config.d.ts +57 -5
- package/dist-types/types/hooks.d.ts +1 -1
- package/dist-types/types/plugin.d.ts +2 -2
- package/dist-types/types/rsbuild.d.ts +2 -0
- package/package.json +7 -7
- package/types.d.ts +4 -0
- package/dist-types/internal.d.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let transformRawLoader_rslib_entry_ = async function
|
|
1
|
+
let transformRawLoader_rslib_entry_ = async function(source, map) {
|
|
2
2
|
var _this__compiler___rsbuildTransformer, _this__compiler;
|
|
3
3
|
let callback = this.async(), bypass = ()=>callback(null, source, map), { id: transformId, getEnvironment } = this.getOptions();
|
|
4
4
|
if (!transformId) return bypass();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const registerOverlay: (createFn: (
|
|
1
|
+
export declare const registerOverlay: (createFn: (html: string) => void, clearFn: () => void) => void;
|
|
@@ -9,3 +9,5 @@ export declare const getCompiledPath: (packageName: string) => string;
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const ensureAbsolutePath: (base: string, filePath: string) => string;
|
|
11
11
|
export declare const pathnameParse: (publicPath: string) => string;
|
|
12
|
+
/** dedupe and remove nested paths */
|
|
13
|
+
export declare const dedupeNestedPaths: (paths: string[]) => string[];
|
package/dist-types/hooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AsyncHook, EnvironmentAsyncHook, InternalContext, ModifyBundlerChainFn, ModifyEnvironmentConfigFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, ModifyRspackConfigFn, ModifyWebpackChainFn, ModifyWebpackConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn,
|
|
1
|
+
import type { AsyncHook, EnvironmentAsyncHook, InternalContext, ModifyBundlerChainFn, ModifyEnvironmentConfigFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, ModifyRspackConfigFn, ModifyWebpackChainFn, ModifyWebpackConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeEnvironmentCompileFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseBuildFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, Rspack } from './types';
|
|
2
2
|
export declare function createEnvironmentAsyncHook<Callback extends (...args: any[]) => any>(): EnvironmentAsyncHook<Callback>;
|
|
3
3
|
export declare function createAsyncHook<Callback extends (...args: any[]) => any>(): AsyncHook<Callback>;
|
|
4
4
|
export declare function initHooks(): {
|
|
@@ -23,7 +23,7 @@ export declare function initHooks(): {
|
|
|
23
23
|
modifyWebpackConfig: EnvironmentAsyncHook<ModifyWebpackConfigFn>;
|
|
24
24
|
modifyRsbuildConfig: AsyncHook<ModifyRsbuildConfigFn>;
|
|
25
25
|
modifyEnvironmentConfig: EnvironmentAsyncHook<ModifyEnvironmentConfigFn>;
|
|
26
|
-
onBeforeEnvironmentCompile: EnvironmentAsyncHook<
|
|
26
|
+
onBeforeEnvironmentCompile: EnvironmentAsyncHook<OnBeforeEnvironmentCompileFn>;
|
|
27
27
|
onAfterEnvironmentCompile: EnvironmentAsyncHook<OnAfterEnvironmentCompileFn>;
|
|
28
28
|
};
|
|
29
29
|
export type Hooks = ReturnType<typeof initHooks>;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { rspack } from '@rspack/core';
|
|
6
6
|
import type * as Rspack from '@rspack/core';
|
|
7
|
-
import * as __internalHelper from './internal';
|
|
8
7
|
export { loadEnv } from './loadEnv';
|
|
9
8
|
export { createRsbuild } from './createRsbuild';
|
|
10
9
|
export { loadConfig, defineConfig, type LoadConfigOptions, type LoadConfigResult, } from './config';
|
|
@@ -16,11 +15,5 @@ export { logger } from './logger';
|
|
|
16
15
|
export { mergeRsbuildConfig } from './mergeConfig';
|
|
17
16
|
export { ensureAssetPrefix } from './helpers';
|
|
18
17
|
export { PLUGIN_SWC_NAME, PLUGIN_CSS_NAME } from './constants';
|
|
19
|
-
export type { AppIcon, AppIconItem, AliasStrategy, Build, BuildOptions, BundlerPluginInstance, CacheGroup, CacheGroups, Charset, ClientConfig, CliShortcut, ConfigChain, ConfigChainWithContext, ConsoleType, CreateCompiler, CreateRsbuildOptions, CrossOrigin, CSSLoaderOptions, CSSModules, CSSModulesLocalsConvention, DataUriLimit, Decorators, DevConfig, DistPathConfig, EnvironmentContext, EnvironmentConfig, FilenameConfig, HistoryApiFallbackContext, HistoryApiFallbackOptions, HtmlConfig, HtmlRspackPlugin, HtmlBasicTag, HtmlFallback, HtmlTagHandler, HtmlTagDescriptor, HtmlTagContext, InspectConfigOptions, InspectConfigResult, InlineChunkConfig, InlineChunkTest, InlineChunkTestFunction, InternalContext, LegalComments, MetaAttrs, MetaOptions, Minify, ModifyBundlerChainFn, ModifyBundlerChainUtils, ModifyChainUtils, ModifyRspackConfigFn, ModifyRspackConfigUtils, ModifyRsbuildConfigFn, ModifyWebpackChainFn, ModifyWebpackChainUtils, ModifyWebpackConfigFn, ModifyWebpackConfigUtils, ModuleFederationConfig, MergedEnvironmentConfig, NormalizedConfig, NormalizedDevConfig, NormalizedEnvironmentConfig, NormalizedHtmlConfig, NormalizedModuleFederationConfig, NormalizedOutputConfig, NormalizedPerformanceConfig, NormalizedSecurityConfig, NormalizedServerConfig, NormalizedSourceConfig, NormalizedToolsConfig, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, OutputConfig, OutputStructure, PerformanceConfig, PluginManager, Polyfill, PostCSSLoaderOptions, PostCSSPlugin, PreviewOptions, PreconnectOption, ProxyConfig, ProxyOptions, PrintUrls, PublicDir, PublicDirOptions, ProgressBarConfig, RequestHandler, ResolvedCreateRsbuildOptions, RsbuildConfig, RsbuildContext, RsbuildEntry, RsbuildEntryDescription, RsbuildInstance, RsbuildMode, RsbuildPlugin, RsbuildPluginAPI, RsbuildPlugins, RsbuildProvider, RsbuildProviderHelpers, RsbuildTarget, RspackChain, RspackRule, SriOptions, SriAlgorithm, ScriptInject, ScriptLoading, SecurityConfig, SourceMap, SetupMiddlewaresFn, SetupMiddlewaresServer, ServerConfig, SourceConfig, SplitChunks, StyleLoaderOptions, ToolsConfig, TransformFn, TransformHandler, TransformImport, WatchFiles, } from './types';
|
|
18
|
+
export type { AppIcon, AppIconItem, AliasStrategy, Build, BuildOptions, BundlerPluginInstance, CacheGroup, CacheGroups, Charset, ClientConfig, CliShortcut, ConfigChain, ConfigChainWithContext, ConsoleType, CreateCompiler, CreateRsbuildOptions, CrossOrigin, CSSLoaderOptions, CSSModules, CSSModulesLocalsConvention, DataUriLimit, Decorators, DevConfig, DistPathConfig, EnvironmentContext, EnvironmentConfig, FilenameConfig, HistoryApiFallbackContext, HistoryApiFallbackOptions, HtmlConfig, HtmlRspackPlugin, HtmlBasicTag, HtmlFallback, HtmlTagHandler, HtmlTagDescriptor, HtmlTagContext, InspectConfigOptions, InspectConfigResult, InlineChunkConfig, InlineChunkTest, InlineChunkTestFunction, InternalContext, LegalComments, ManifestData, ManifestConfig, ManifestObjectConfig, MetaAttrs, MetaOptions, Minify, ModifyBundlerChainFn, ModifyBundlerChainUtils, ModifyChainUtils, ModifyEnvironmentConfigFn, ModifyEnvironmentConfigUtils, ModifyHTMLTagsContext, ModifyHTMLTagsFn, ModifyRsbuildConfigUtils, ModifyRspackConfigFn, ModifyRspackConfigUtils, ModifyRsbuildConfigFn, ModifyWebpackChainFn, ModifyWebpackChainUtils, ModifyWebpackConfigFn, ModifyWebpackConfigUtils, ModuleFederationConfig, MergedEnvironmentConfig, NormalizedConfig, NormalizedDevConfig, NormalizedEnvironmentConfig, NormalizedHtmlConfig, NormalizedModuleFederationConfig, NormalizedOutputConfig, NormalizedPerformanceConfig, NormalizedSecurityConfig, NormalizedServerConfig, NormalizedSourceConfig, NormalizedToolsConfig, OnAfterEnvironmentCompileFn, OnBeforeEnvironmentCompileFn, OnCloseBuildFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, OutputConfig, OutputStructure, PreloadIncludeType, PerformanceConfig, PluginManager, Polyfill, PostCSSLoaderOptions, PostCSSOptions, PostCSSPlugin, PreviewOptions, PreconnectOption, ProxyConfig, ProxyOptions, PrintUrls, PublicDir, PublicDirOptions, ProgressBarConfig, RequestHandler, ResolvedCreateRsbuildOptions, RsbuildConfig, RsbuildContext, RsbuildEntry, RsbuildEntryDescription, RsbuildInstance, RsbuildMode, RsbuildPlugin, RsbuildPluginAPI, RsbuildPlugins, RsbuildProvider, RsbuildProviderHelpers, RsbuildTarget, RspackChain, RspackRule, StartDevServerOptions, SriOptions, SriAlgorithm, ScriptInject, ScriptLoading, SecurityConfig, SourceMap, SetupMiddlewaresFn, SetupMiddlewaresServer, ServerConfig, SourceConfig, SplitChunks, StyleLoaderOptions, TransformContext, TransformDescriptor, ToolsConfig, TransformFn, TransformHandler, TransformImport, WatchFiles, } from './types';
|
|
20
19
|
export type { ChainIdentifier } from './configChain';
|
|
21
|
-
export {
|
|
22
|
-
/**
|
|
23
|
-
* @private
|
|
24
|
-
* TODO: remove this in Rspack v1.2.0
|
|
25
|
-
*/
|
|
26
|
-
__internalHelper, };
|
|
@@ -20,6 +20,7 @@ import type { HtmlRspackPlugin, PreloadOrPreFetchOption } from '../../types';
|
|
|
20
20
|
type LinkType = 'preload' | 'prefetch';
|
|
21
21
|
export declare class HtmlPreloadOrPrefetchPlugin implements RspackPluginInstance {
|
|
22
22
|
readonly options: PreloadOrPreFetchOption;
|
|
23
|
+
name: string;
|
|
23
24
|
resourceHints: HtmlRspackPlugin.HtmlTagObject[];
|
|
24
25
|
type: LinkType;
|
|
25
26
|
HTMLCount: number;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* https://github.com/mahdyar/ansi-html-community
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* https://github.com/mahdyar/ansi-html-community/blob/master/LICENSE
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Converts text with ANSI color codes to HTML markup.
|
|
2
|
+
* Converts text with ANSI color codes to HTML markup
|
|
10
3
|
*/
|
|
11
4
|
export declare function ansiHTML(text: string): string;
|
|
12
5
|
export default ansiHTML;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { IncomingMessage } from 'node:http';
|
|
2
2
|
import type { Socket } from 'node:net';
|
|
3
3
|
import type { DevConfig, Rspack } from '../types';
|
|
4
|
+
interface SocketMessage {
|
|
5
|
+
type: string;
|
|
6
|
+
compilationId?: string;
|
|
7
|
+
data?: Record<string, any> | string | boolean;
|
|
8
|
+
}
|
|
4
9
|
export declare class SocketServer {
|
|
5
10
|
private wsServer;
|
|
6
11
|
private readonly sockets;
|
|
@@ -12,11 +17,7 @@ export declare class SocketServer {
|
|
|
12
17
|
upgrade(req: IncomingMessage, sock: Socket, head: any): void;
|
|
13
18
|
prepare(): Promise<void>;
|
|
14
19
|
updateStats(stats: Rspack.Stats): void;
|
|
15
|
-
sockWrite({ type, compilationId, data
|
|
16
|
-
type: string;
|
|
17
|
-
compilationId?: string;
|
|
18
|
-
data?: Record<string, any> | string | boolean;
|
|
19
|
-
}): void;
|
|
20
|
+
sockWrite({ type, compilationId, data }: SocketMessage): void;
|
|
20
21
|
private singleWrite;
|
|
21
22
|
close(): void;
|
|
22
23
|
private onConnect;
|
|
@@ -24,3 +25,4 @@ export declare class SocketServer {
|
|
|
24
25
|
private sendStats;
|
|
25
26
|
private send;
|
|
26
27
|
}
|
|
28
|
+
export {};
|
|
@@ -6,6 +6,7 @@ import type { ChokidarOptions } from '../../compiled/chokidar/index.js';
|
|
|
6
6
|
import type cors from '../../compiled/cors/index.js';
|
|
7
7
|
import type { Options as HttpProxyOptions, Filter as ProxyFilter } from '../../compiled/http-proxy-middleware/index.js';
|
|
8
8
|
import type RspackChain from '../../compiled/rspack-chain/index.js';
|
|
9
|
+
import type { FileDescriptor } from '../../compiled/rspack-manifest-plugin';
|
|
9
10
|
import type { BundleAnalyzerPlugin } from '../../compiled/webpack-bundle-analyzer/index.js';
|
|
10
11
|
import type { ModifyBundlerChainUtils, ModifyChainUtils, Routes } from './hooks';
|
|
11
12
|
import type { ModifyWebpackChainUtils, ModifyWebpackConfigUtils, RsbuildPlugins } from './plugin';
|
|
@@ -218,10 +219,13 @@ export type PublicDirOptions = {
|
|
|
218
219
|
*/
|
|
219
220
|
name?: string;
|
|
220
221
|
/**
|
|
221
|
-
* Whether to copy files from the
|
|
222
|
-
*
|
|
222
|
+
* Whether to copy files from the public directory to the dist directory on production build.
|
|
223
|
+
* - `true`: copy files
|
|
224
|
+
* - `false`: do not copy files
|
|
225
|
+
* - `'auto'`: if `output.target` is not `'node'`, copy files, otherwise do not copy
|
|
226
|
+
* @default 'auto'
|
|
223
227
|
*/
|
|
224
|
-
copyOnBuild?: boolean;
|
|
228
|
+
copyOnBuild?: boolean | 'auto';
|
|
225
229
|
/**
|
|
226
230
|
* whether to watch the public directory and reload the page when the files change
|
|
227
231
|
* @default false
|
|
@@ -690,6 +694,49 @@ export type InlineChunkConfig = boolean | InlineChunkTest | {
|
|
|
690
694
|
enable?: boolean | 'auto';
|
|
691
695
|
test: InlineChunkTest;
|
|
692
696
|
};
|
|
697
|
+
export type ManifestByEntry = {
|
|
698
|
+
initial?: {
|
|
699
|
+
js?: string[];
|
|
700
|
+
css?: string[];
|
|
701
|
+
};
|
|
702
|
+
async?: {
|
|
703
|
+
js?: string[];
|
|
704
|
+
css?: string[];
|
|
705
|
+
};
|
|
706
|
+
/** other assets (e.g. png、svg、source map) related to the current entry */
|
|
707
|
+
assets?: string[];
|
|
708
|
+
html?: string[];
|
|
709
|
+
};
|
|
710
|
+
export type ManifestData = {
|
|
711
|
+
entries: {
|
|
712
|
+
/** relate to Rsbuild's source.entry config */
|
|
713
|
+
[entryName: string]: ManifestByEntry;
|
|
714
|
+
};
|
|
715
|
+
/** Flatten all assets */
|
|
716
|
+
allFiles: string[];
|
|
717
|
+
};
|
|
718
|
+
export type ManifestObjectConfig = {
|
|
719
|
+
/**
|
|
720
|
+
* The filename or path of the manifest file.
|
|
721
|
+
* The manifest file will be emitted to the output directory.
|
|
722
|
+
* @default 'manifest.json'
|
|
723
|
+
*/
|
|
724
|
+
filename?: string;
|
|
725
|
+
/**
|
|
726
|
+
* A custom function to generate the content of the manifest file.
|
|
727
|
+
*/
|
|
728
|
+
generate?: (params: {
|
|
729
|
+
files: FileDescriptor[];
|
|
730
|
+
manifestData: ManifestData;
|
|
731
|
+
}) => Record<string, unknown>;
|
|
732
|
+
/**
|
|
733
|
+
* Allows you to filter the files included in the manifest.
|
|
734
|
+
* The function receives a `file` parameter and returns `true` to keep the file, or `false` to exclude it.
|
|
735
|
+
* @default (file: FileDescriptor) => !file.name.endsWith('.LICENSE.txt')
|
|
736
|
+
*/
|
|
737
|
+
filter?: (file: FileDescriptor) => boolean;
|
|
738
|
+
};
|
|
739
|
+
export type ManifestConfig = string | boolean | ManifestObjectConfig;
|
|
693
740
|
export interface OutputConfig {
|
|
694
741
|
/**
|
|
695
742
|
* Specify build target to run in specified environment.
|
|
@@ -759,10 +806,14 @@ export interface OutputConfig {
|
|
|
759
806
|
*/
|
|
760
807
|
minify?: Minify;
|
|
761
808
|
/**
|
|
762
|
-
*
|
|
809
|
+
* Configure how to generate the manifest file.
|
|
810
|
+
* - `true`: Generate a manifest file named `manifest.json` in the output directory.
|
|
811
|
+
* - `false`: Do not generate the manifest file.
|
|
812
|
+
* - `string`: Generate a manifest file with the specified filename or path.
|
|
813
|
+
* - `object`: Generate a manifest file with the specified options.
|
|
763
814
|
* @default false
|
|
764
815
|
*/
|
|
765
|
-
manifest?:
|
|
816
|
+
manifest?: ManifestConfig;
|
|
766
817
|
/**
|
|
767
818
|
* Whether to generate source map files, and which format of source map to generate.
|
|
768
819
|
*
|
|
@@ -834,6 +885,7 @@ export interface NormalizedOutputConfig extends OutputConfig {
|
|
|
834
885
|
filenameHash: boolean | string;
|
|
835
886
|
assetPrefix: string;
|
|
836
887
|
dataUriLimit: number | NormalizedDataUriLimit;
|
|
888
|
+
manifest: ManifestConfig;
|
|
837
889
|
minify: Minify;
|
|
838
890
|
inlineScripts: InlineChunkConfig;
|
|
839
891
|
inlineStyles: InlineChunkConfig;
|
|
@@ -9,7 +9,7 @@ type CompileCommonParams = {
|
|
|
9
9
|
isFirstCompile: boolean;
|
|
10
10
|
isWatch: boolean;
|
|
11
11
|
};
|
|
12
|
-
export type
|
|
12
|
+
export type OnBeforeEnvironmentCompileFn<B = 'rspack'> = (params: CompileCommonParams & {
|
|
13
13
|
environment: EnvironmentContext;
|
|
14
14
|
bundlerConfig?: B extends 'rspack' ? Rspack.Configuration : WebpackConfig;
|
|
15
15
|
}) => MaybePromise<void>;
|
|
@@ -3,7 +3,7 @@ import type RspackChain from '../../compiled/rspack-chain/index.js';
|
|
|
3
3
|
import type { ChainIdentifier } from '../configChain';
|
|
4
4
|
import type { ModifyRspackConfigUtils, NormalizedConfig, NormalizedEnvironmentConfig, RsbuildConfig } from './config';
|
|
5
5
|
import type { RsbuildContext } from './context';
|
|
6
|
-
import type { EnvironmentContext, ModifyBundlerChainFn, ModifyChainUtils, ModifyEnvironmentConfigFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn,
|
|
6
|
+
import type { EnvironmentContext, ModifyBundlerChainFn, ModifyChainUtils, ModifyEnvironmentConfigFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeEnvironmentCompileFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseBuildFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn } from './hooks';
|
|
7
7
|
import type { RsbuildTarget } from './rsbuild';
|
|
8
8
|
import type { Rspack } from './rspack';
|
|
9
9
|
import type { HtmlRspackPlugin } from './thirdParty';
|
|
@@ -287,7 +287,7 @@ export type RsbuildPluginAPI = Readonly<{
|
|
|
287
287
|
onAfterBuild: PluginHook<OnAfterBuildFn>;
|
|
288
288
|
onBeforeBuild: PluginHook<OnBeforeBuildFn>;
|
|
289
289
|
onAfterEnvironmentCompile: PluginHook<OnAfterEnvironmentCompileFn>;
|
|
290
|
-
onBeforeEnvironmentCompile: PluginHook<
|
|
290
|
+
onBeforeEnvironmentCompile: PluginHook<OnBeforeEnvironmentCompileFn>;
|
|
291
291
|
onCloseDevServer: PluginHook<OnCloseDevServerFn>;
|
|
292
292
|
onDevCompileDone: PluginHook<OnDevCompileDoneFn>;
|
|
293
293
|
onAfterStartDevServer: PluginHook<OnAfterStartDevServerFn>;
|
|
@@ -86,6 +86,8 @@ export type CreateRsbuildOptions = {
|
|
|
86
86
|
cwd?: string;
|
|
87
87
|
/**
|
|
88
88
|
* Only build specified environments.
|
|
89
|
+
* For example, passing `['web']` will only build the `web` environment.
|
|
90
|
+
* If not specified or passing an empty array, all environments will be built.
|
|
89
91
|
*/
|
|
90
92
|
environment?: string[];
|
|
91
93
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-beta.0",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,28 +46,28 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "1.
|
|
49
|
+
"@rspack/core": "1.2.0-beta.0",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
51
|
"@swc/helpers": "^0.5.15",
|
|
52
52
|
"core-js": "~3.39.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@rslib/core": "0.
|
|
55
|
+
"@rslib/core": "0.3.0",
|
|
56
56
|
"@types/connect": "3.4.38",
|
|
57
|
-
"@types/node": "^22.10.
|
|
57
|
+
"@types/node": "^22.10.5",
|
|
58
58
|
"@types/on-finished": "2.3.4",
|
|
59
59
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
60
60
|
"@types/ws": "^8.5.13",
|
|
61
61
|
"browserslist-load-config": "1.0.0",
|
|
62
|
+
"cac": "^6.7.14",
|
|
62
63
|
"chokidar": "^4.0.3",
|
|
63
|
-
"commander": "^12.1.0",
|
|
64
64
|
"connect": "3.7.0",
|
|
65
65
|
"connect-history-api-fallback": "^2.0.0",
|
|
66
66
|
"cors": "^2.8.5",
|
|
67
67
|
"css-loader": "7.1.2",
|
|
68
68
|
"deepmerge": "^4.3.1",
|
|
69
69
|
"dotenv": "16.4.7",
|
|
70
|
-
"dotenv-expand": "
|
|
70
|
+
"dotenv-expand": "12.0.1",
|
|
71
71
|
"html-rspack-plugin": "6.0.2",
|
|
72
72
|
"http-proxy-middleware": "^2.0.6",
|
|
73
73
|
"jiti": "^1.21.7",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"reduce-configs": "^1.1.0",
|
|
84
84
|
"rsbuild-dev-middleware": "0.1.2",
|
|
85
85
|
"rslog": "^1.2.3",
|
|
86
|
-
"rspack-chain": "^1.1.
|
|
86
|
+
"rspack-chain": "^1.1.1",
|
|
87
87
|
"rspack-manifest-plugin": "5.0.3",
|
|
88
88
|
"sirv": "^3.0.0",
|
|
89
89
|
"style-loader": "3.3.4",
|
package/types.d.ts
CHANGED