@rsbuild/core 0.7.3 → 0.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.
- package/compiled/postcss-load-config/index.js +10 -10
- package/dist/index.cjs +266 -152
- package/dist/index.js +213 -126
- package/dist-types/config.d.ts +11 -1
- package/dist-types/constants.d.ts +21 -2
- package/dist-types/helpers.d.ts +2 -2
- package/dist-types/index.d.ts +1 -1
- package/dist-types/internal.d.ts +1 -0
- package/dist-types/plugins/{startUrl.d.ts → open.d.ts} +2 -1
- package/dist-types/rspack/HtmlBasicPlugin.d.ts +2 -2
- package/package.json +2 -2
package/dist-types/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NormalizedConfig, RsbuildConfig } from '@rsbuild/shared';
|
|
1
|
+
import type { InspectConfigOptions, NormalizedConfig, RsbuildConfig } from '@rsbuild/shared';
|
|
2
2
|
export declare const withDefaultConfig: (rootPath: string, config: RsbuildConfig) => Promise<RsbuildConfig>;
|
|
3
3
|
/** #__PURE__
|
|
4
4
|
* 1. May used by multiple plugins.
|
|
@@ -31,3 +31,13 @@ export declare function loadConfig({ cwd, path, envMode, }?: {
|
|
|
31
31
|
content: RsbuildConfig;
|
|
32
32
|
filePath: string | null;
|
|
33
33
|
}>;
|
|
34
|
+
export declare function outputInspectConfigFiles({ rsbuildConfig, rawRsbuildConfig, bundlerConfigs, inspectOptions, configType, }: {
|
|
35
|
+
configType: string;
|
|
36
|
+
rsbuildConfig: NormalizedConfig;
|
|
37
|
+
rawRsbuildConfig: string;
|
|
38
|
+
bundlerConfigs: string[];
|
|
39
|
+
inspectOptions: InspectConfigOptions & {
|
|
40
|
+
outputPath: string;
|
|
41
|
+
};
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
export declare function stringifyConfig(config: unknown, verbose?: boolean): Promise<string>;
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const ROOT_DIST_DIR = "dist";
|
|
2
|
+
export declare const HTML_DIST_DIR = "/";
|
|
3
|
+
export declare const SERVER_DIST_DIR = "server";
|
|
4
|
+
export declare const SERVICE_WORKER_DIST_DIR = "worker";
|
|
5
|
+
export declare const JS_DIST_DIR = "static/js";
|
|
6
|
+
export declare const CSS_DIST_DIR = "static/css";
|
|
7
|
+
export declare const SVG_DIST_DIR = "static/svg";
|
|
8
|
+
export declare const FONT_DIST_DIR = "static/font";
|
|
9
|
+
export declare const WASM_DIST_DIR = "static/wasm";
|
|
10
|
+
export declare const IMAGE_DIST_DIR = "static/image";
|
|
11
|
+
export declare const MEDIA_DIST_DIR = "static/media";
|
|
3
12
|
export declare const LOADER_PATH: string;
|
|
4
13
|
export declare const STATIC_PATH: string;
|
|
5
14
|
export declare const COMPILED_PATH: string;
|
|
6
15
|
export declare const TS_CONFIG_FILE = "tsconfig.json";
|
|
16
|
+
export declare const DEFAULT_PORT = 3000;
|
|
17
|
+
export declare const DEFAULT_DATA_URL_SIZE = 4096;
|
|
18
|
+
export declare const DEFAULT_MOUNT_ID = "root";
|
|
19
|
+
export declare const DEFAULT_DEV_HOST = "0.0.0.0";
|
|
7
20
|
export declare const HTML_REGEX: RegExp;
|
|
8
21
|
export declare const CSS_REGEX: RegExp;
|
|
22
|
+
export declare const PLUGIN_SWC_NAME = "rsbuild:swc";
|
|
23
|
+
export declare const PLUGIN_CSS_NAME = "rsbuild:css";
|
|
24
|
+
export declare const FONT_EXTENSIONS: string[];
|
|
25
|
+
export declare const IMAGE_EXTENSIONS: string[];
|
|
26
|
+
export declare const VIDEO_EXTENSIONS: string[];
|
|
27
|
+
export declare const AUDIO_EXTENSIONS: string[];
|
package/dist-types/helpers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MultiStats, type RspackChain, type Stats, type StatsError, isMultiCompiler } from '@rsbuild/shared';
|
|
2
2
|
import type { StatsCompilation, StatsValue } from '@rspack/core';
|
|
3
3
|
export declare const rspackMinVersion = "0.6.2";
|
|
4
4
|
export declare const isSatisfyRspackVersion: (originalVersion: string) => Promise<boolean>;
|
|
@@ -14,7 +14,7 @@ export declare function formatStats(stats: Stats | MultiStats, options?: StatsVa
|
|
|
14
14
|
level?: undefined;
|
|
15
15
|
};
|
|
16
16
|
export declare const formatPublicPath: (publicPath: string, withSlash?: boolean) => string;
|
|
17
|
-
export declare const getPublicPathFromChain: (chain:
|
|
17
|
+
export declare const getPublicPathFromChain: (chain: RspackChain, withSlash?: boolean) => string;
|
|
18
18
|
/**
|
|
19
19
|
* ensure absolute file path.
|
|
20
20
|
* @param base - Base path to resolve relative from.
|
package/dist-types/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { logger } from '@rsbuild/shared';
|
|
|
15
15
|
export { mergeRsbuildConfig } from './mergeConfig';
|
|
16
16
|
export { PLUGIN_SWC_NAME, PLUGIN_CSS_NAME } from './constants';
|
|
17
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,
|
|
18
|
+
export type { RsbuildMode, RsbuildEntry, RsbuildTarget, RsbuildContext, InspectConfigResult, InspectConfigOptions, Minify, Polyfill, PrintUrls, PublicDir, Decorators, RspackRule, WatchFiles, CSSModules, CrossOrigin, ConsoleType, SplitChunks, RspackChain, ClientConfig, ScriptInject, ConfigChain, PostCSSPlugin, ScriptLoading, LegalComments, AliasStrategy, FilenameConfig, DistPathConfig, OutputStructure, ChainIdentifier, PreconnectOption, CSSLoaderOptions, ModifyChainUtils, StyleLoaderOptions, PostCSSLoaderOptions, ConfigChainWithContext, 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
|
@@ -8,6 +8,7 @@ export { prepareCli } from './cli/prepare';
|
|
|
8
8
|
export { initPlugins, createPluginManager } from './pluginManager';
|
|
9
9
|
export { initHooks, type Hooks } from './initHooks';
|
|
10
10
|
export { initRsbuildConfig } from './provider/initConfigs';
|
|
11
|
+
export { stringifyConfig, outputInspectConfigFiles } from './config';
|
|
11
12
|
export type { InternalContext } from './types';
|
|
12
13
|
export { setHTMLPlugin, getHTMLPlugin } from './pluginHelper';
|
|
13
14
|
export { formatStats, getStatsOptions } from './helpers';
|
|
@@ -9,4 +9,5 @@ import type { RsbuildPlugin } from '../types';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function openBrowser(url: string): Promise<boolean>;
|
|
11
11
|
export declare const replacePlaceholder: (url: string, port: number) => string;
|
|
12
|
-
export declare function
|
|
12
|
+
export declare function resolveUrl(str: string, base: string): string;
|
|
13
|
+
export declare function pluginOpen(): RsbuildPlugin;
|
|
@@ -33,7 +33,7 @@ export declare const hasTitle: (html?: string) => boolean;
|
|
|
33
33
|
export declare class HtmlBasicPlugin {
|
|
34
34
|
readonly name: string;
|
|
35
35
|
readonly options: HtmlBasicPluginOptions;
|
|
36
|
-
readonly modifyTagsFn
|
|
37
|
-
constructor(options: HtmlBasicPluginOptions, modifyTagsFn
|
|
36
|
+
readonly modifyTagsFn?: ModifyHTMLTagsFn;
|
|
37
|
+
constructor(options: HtmlBasicPluginOptions, modifyTagsFn?: ModifyHTMLTagsFn);
|
|
38
38
|
apply(compiler: Compiler): void;
|
|
39
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -51,7 +51,7 @@
|
|
|
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.
|
|
54
|
+
"@rsbuild/shared": "0.7.4"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/connect": "3.4.38",
|