@rsbuild/core 0.0.24 → 0.0.25
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/dist/createRsbuild.d.ts +1 -1
- package/dist/createRsbuild.js +1 -2
- package/dist/index.d.ts +2 -1
- package/dist/plugins/asset.d.ts +2 -2
- package/dist/plugins/bundleAnalyzer.d.ts +2 -2
- package/dist/plugins/cache.d.ts +2 -2
- package/dist/plugins/cache.js +0 -3
- package/dist/plugins/cleanOutput.d.ts +2 -2
- package/dist/plugins/define.d.ts +2 -2
- package/dist/plugins/devtool.d.ts +2 -2
- package/dist/plugins/entry.d.ts +1 -1
- package/dist/plugins/externals.d.ts +2 -2
- package/dist/plugins/fileSize.d.ts +2 -2
- package/dist/plugins/fileSize.js +2 -2
- package/dist/plugins/html.d.ts +3 -2
- package/dist/plugins/inlineChunk.d.ts +2 -2
- package/dist/plugins/moment.d.ts +2 -2
- package/dist/plugins/networkPerformance.d.ts +2 -2
- package/dist/plugins/nodeAddons.d.ts +2 -2
- package/dist/plugins/performance.d.ts +2 -2
- package/dist/plugins/preloadOrPrefetch.d.ts +2 -2
- package/dist/plugins/splitChunks.d.ts +2 -2
- package/dist/plugins/startUrl.d.ts +2 -2
- package/dist/plugins/target.d.ts +2 -2
- package/dist/plugins/toml.d.ts +2 -2
- package/dist/plugins/wasm.d.ts +2 -2
- package/dist/plugins/yaml.d.ts +2 -2
- package/dist/{rspack-provider/rspackPlugin/removeCssSourcemapPlugin.js → rspack-plugins/RemoveCssSourcemapPlugin.js} +3 -3
- package/dist/rspack-provider/config/defaults.d.ts +1 -1
- package/dist/rspack-provider/config/normalize.d.ts +1 -1
- package/dist/rspack-provider/core/createCompiler.d.ts +1 -1
- package/dist/rspack-provider/core/createContext.d.ts +1 -1
- package/dist/rspack-provider/core/initConfigs.d.ts +1 -1
- package/dist/rspack-provider/core/initHooks.d.ts +2 -2
- package/dist/rspack-provider/core/initPlugins.d.ts +1 -1
- package/dist/rspack-provider/core/rspackConfig.d.ts +1 -1
- package/dist/rspack-provider/index.d.ts +0 -1
- package/dist/rspack-provider/plugins/basic.d.ts +1 -1
- package/dist/rspack-provider/plugins/css.d.ts +1 -1
- package/dist/rspack-provider/plugins/css.js +1 -1
- package/dist/rspack-provider/plugins/hmr.d.ts +1 -1
- package/dist/rspack-provider/plugins/less.d.ts +1 -1
- package/dist/rspack-provider/plugins/minimize.d.ts +1 -1
- package/dist/rspack-provider/plugins/output.d.ts +1 -1
- package/dist/rspack-provider/plugins/progress.d.ts +1 -1
- package/dist/rspack-provider/plugins/resolve.d.ts +1 -1
- package/dist/rspack-provider/plugins/rspackProfile.d.ts +1 -1
- package/dist/rspack-provider/plugins/sass.d.ts +1 -1
- package/dist/rspack-provider/plugins/swc.d.ts +1 -1
- package/dist/rspack-provider/plugins/transition.d.ts +1 -1
- package/dist/rspack-provider/provider.d.ts +1 -1
- package/dist/rspack-provider/shared/plugin.d.ts +1 -1
- package/dist/types.d.ts +19 -0
- package/dist/{rspack-provider/types/plugin.js → types.js} +2 -2
- package/package.json +3 -3
- package/dist/rspack-provider/types/context.d.ts +0 -16
- package/dist/rspack-provider/types/context.js +0 -16
- package/dist/rspack-provider/types/index.d.ts +0 -3
- package/dist/rspack-provider/types/index.js +0 -24
- package/dist/rspack-provider/types/plugin.d.ts +0 -4
- /package/dist/{rspack-provider/rspackPlugin/removeCssSourcemapPlugin.d.ts → rspack-plugins/RemoveCssSourcemapPlugin.d.ts} +0 -0
package/dist/createRsbuild.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RsbuildInstance, type RsbuildProvider, type CreateRsbuildOptions } from '@rsbuild/shared';
|
|
2
|
-
import type { RsbuildConfig } from './
|
|
2
|
+
import type { RsbuildConfig } from './types';
|
|
3
3
|
export declare const getCreateRsbuildDefaultOptions: () => Required<CreateRsbuildOptions>;
|
|
4
4
|
export declare function createRsbuild<P extends ({
|
|
5
5
|
rsbuildConfig
|
package/dist/createRsbuild.js
CHANGED
|
@@ -42,8 +42,7 @@ const getRspackProvider = async (rsbuildConfig) => {
|
|
|
42
42
|
};
|
|
43
43
|
const getCreateRsbuildDefaultOptions = () => ({
|
|
44
44
|
cwd: process.cwd(),
|
|
45
|
-
target: ["web"]
|
|
46
|
-
configPath: null
|
|
45
|
+
target: ["web"]
|
|
47
46
|
});
|
|
48
47
|
async function createRsbuild(options) {
|
|
49
48
|
const { rsbuildConfig } = options;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { createRsbuild, getCreateRsbuildDefaultOptions } from './createRsbuild';
|
|
2
2
|
export { mergeRsbuildConfig } from '@rsbuild/shared';
|
|
3
3
|
export { defineConfig } from './cli';
|
|
4
|
-
export type { Rspack
|
|
4
|
+
export type { Rspack } from './rspack-provider';
|
|
5
|
+
export type { RsbuildConfig, NormalizedConfig, RsbuildPlugin, RsbuildPluginAPI } from './types';
|
|
5
6
|
export type { Context, RsbuildMode, RsbuildEntry, RsbuildTarget, RsbuildInstance, CreateRsbuildOptions, InspectConfigOptions, OnExitFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterStartDevServerFn, OnBeforeBuildFn, OnBeforeStartDevServerFn, OnBeforeCreateCompilerFn, OnDevCompileDoneFn, ModifyRsbuildConfigFn } from '@rsbuild/shared';
|
package/dist/plugins/asset.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
2
|
export declare function getRegExpForExts(exts: string[]): RegExp;
|
|
3
|
-
export declare const pluginAsset: () =>
|
|
3
|
+
export declare const pluginAsset: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function pluginBundleAnalyzer():
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare function pluginBundleAnalyzer(): RsbuildPlugin;
|
package/dist/plugins/cache.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginCache: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginCache: () => RsbuildPlugin;
|
package/dist/plugins/cache.js
CHANGED
|
@@ -64,9 +64,6 @@ async function getBuildDependencies(context) {
|
|
|
64
64
|
if (await (0, import_shared2.isFileExists)(rootPackageJson)) {
|
|
65
65
|
buildDependencies.packageJson = [rootPackageJson];
|
|
66
66
|
}
|
|
67
|
-
if (context.configPath) {
|
|
68
|
-
buildDependencies.config = [context.configPath];
|
|
69
|
-
}
|
|
70
67
|
if (context.tsconfigPath) {
|
|
71
68
|
buildDependencies.tsconfig = [context.tsconfigPath];
|
|
72
69
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const pluginCleanOutput: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginCleanOutput: () => RsbuildPlugin;
|
package/dist/plugins/define.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginDefine: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginDefine: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginDevtool: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginDevtool: () => RsbuildPlugin;
|
package/dist/plugins/entry.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '../
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
2
|
export declare const pluginEntry: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function pluginExternals():
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare function pluginExternals(): RsbuildPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
2
|
/** Filter source map and license files */
|
|
3
3
|
export declare const filterAsset: (asset: string) => boolean;
|
|
4
|
-
export declare const pluginFileSize: () =>
|
|
4
|
+
export declare const pluginFileSize: () => RsbuildPlugin;
|
package/dist/plugins/fileSize.js
CHANGED
|
@@ -144,8 +144,8 @@ const pluginFileSize = () => ({
|
|
|
144
144
|
try {
|
|
145
145
|
await printFileSizes(stats, api.context.distPath);
|
|
146
146
|
} catch (err) {
|
|
147
|
-
import_shared2.logger.
|
|
148
|
-
import_shared2.logger.
|
|
147
|
+
import_shared2.logger.warn("Failed to print file size.");
|
|
148
|
+
import_shared2.logger.warn(err);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
});
|
package/dist/plugins/html.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { MetaAttrs, HtmlConfig, MetaOptions, NormalizedConfig,
|
|
1
|
+
import type { MetaAttrs, HtmlConfig, MetaOptions, NormalizedConfig, SharedRsbuildPluginAPI, NormalizedOutputConfig } from '@rsbuild/shared';
|
|
2
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
3
|
export declare function getTitle(entryName: string, config: NormalizedConfig): string;
|
|
3
4
|
export declare function getInject(entryName: string, config: NormalizedConfig): import("@rsbuild/shared").ScriptInject;
|
|
4
5
|
export declare function getTemplatePath(entryName: string, config: NormalizedConfig): string;
|
|
@@ -11,4 +12,4 @@ export declare function getMetaTags(entryName: string, config: {
|
|
|
11
12
|
output: NormalizedOutputConfig;
|
|
12
13
|
}): Promise<MetaAttrs[]>;
|
|
13
14
|
export declare const applyInjectTags: (api: SharedRsbuildPluginAPI) => void;
|
|
14
|
-
export declare const pluginHtml: () =>
|
|
15
|
+
export declare const pluginHtml: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginInlineChunk: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginInlineChunk: () => RsbuildPlugin;
|
package/dist/plugins/moment.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const pluginMoment: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginMoment: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginNetworkPerformance: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginNetworkPerformance: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginNodeAddons: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginNodeAddons: () => RsbuildPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Apply some configs of Rsbuild performance
|
|
4
4
|
*/
|
|
5
|
-
export declare const pluginPerformance: () =>
|
|
5
|
+
export declare const pluginPerformance: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginPreloadOrPrefetch: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginPreloadOrPrefetch: () => RsbuildPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
2
|
/** Expect to match path just like "./node_modules/react-router/" */
|
|
3
3
|
export declare const createDependenciesRegExp: (...dependencies: (string | RegExp)[]) => RegExp;
|
|
4
|
-
export declare function pluginSplitChunks():
|
|
4
|
+
export declare function pluginSplitChunks(): RsbuildPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* This method is modified based on source found in
|
|
4
4
|
* https://github.com/facebook/create-react-app
|
|
@@ -9,4 +9,4 @@ import { type DefaultRsbuildPlugin } from '@rsbuild/shared';
|
|
|
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 pluginStartUrl():
|
|
12
|
+
export declare function pluginStartUrl(): RsbuildPlugin;
|
package/dist/plugins/target.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const pluginTarget: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginTarget: () => RsbuildPlugin;
|
package/dist/plugins/toml.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginToml: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginToml: () => RsbuildPlugin;
|
package/dist/plugins/wasm.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginWasm: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginWasm: () => RsbuildPlugin;
|
package/dist/plugins/yaml.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const pluginYaml: () =>
|
|
1
|
+
import type { RsbuildPlugin } from '../types';
|
|
2
|
+
export declare const pluginYaml: () => RsbuildPlugin;
|
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var RemoveCssSourcemapPlugin_exports = {};
|
|
20
|
+
__export(RemoveCssSourcemapPlugin_exports, {
|
|
21
21
|
RemoveCssSourcemapPlugin: () => RemoveCssSourcemapPlugin
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(RemoveCssSourcemapPlugin_exports);
|
|
24
24
|
var import_shared = require("@rsbuild/shared");
|
|
25
25
|
class RemoveCssSourcemapPlugin {
|
|
26
26
|
constructor(htmlPlugin) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type RspackConfig } from '@rsbuild/shared';
|
|
2
2
|
import { type RspackCompiler, type RspackMultiCompiler } from '@rsbuild/shared';
|
|
3
3
|
import { type InitConfigsOptions } from './initConfigs';
|
|
4
|
-
import type { Context } from '
|
|
4
|
+
import type { Context } from '../../types';
|
|
5
5
|
export declare function createCompiler({
|
|
6
6
|
context,
|
|
7
7
|
rspackConfigs
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CreateRsbuildOptions } from '@rsbuild/shared';
|
|
2
|
-
import type { Context, RsbuildConfig } from '
|
|
2
|
+
import type { Context, RsbuildConfig } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Generate the actual context used in the build,
|
|
5
5
|
* which can have a lot of overhead and take some side effects.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OnExitFn, OnAfterBuildFn, OnBeforeBuildFn, OnDevCompileDoneFn, ModifyRsbuildConfigFn, OnAfterStartDevServerFn, OnBeforeStartDevServerFn, OnAfterCreateCompilerFn, OnBeforeCreateCompilerFn, ModifyBundlerChainFn, type RspackConfig, type ModifyRspackConfigFn } from '@rsbuild/shared';
|
|
2
|
-
import type { RsbuildConfig } from '
|
|
1
|
+
import { type OnExitFn, type OnAfterBuildFn, type OnBeforeBuildFn, type OnDevCompileDoneFn, type ModifyRsbuildConfigFn, type OnAfterStartDevServerFn, type OnBeforeStartDevServerFn, type OnAfterCreateCompilerFn, type OnBeforeCreateCompilerFn, type ModifyBundlerChainFn, type RspackConfig, type ModifyRspackConfigFn } from '@rsbuild/shared';
|
|
2
|
+
import type { RsbuildConfig } from '../../types';
|
|
3
3
|
import type { Compiler, MultiCompiler } from '@rspack/core';
|
|
4
4
|
export declare function initHooks(): {
|
|
5
5
|
/** parameters are not bundler-related */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { getRspackVersion } from './shared/rspackVersion';
|
|
2
2
|
export { rspackProvider } from './provider';
|
|
3
3
|
export type { RspackProvider } from './provider';
|
|
4
|
-
export type { RsbuildConfig, NormalizedConfig, RsbuildPlugin, RsbuildPluginAPI } from './types';
|
|
5
4
|
export type { Rspack, RspackConfig } from '@rsbuild/shared';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BundlerChain, type Context, type RspackRule, type ModifyBundlerChainUtils } from '@rsbuild/shared';
|
|
2
|
-
import type { RsbuildPlugin, NormalizedConfig } from '
|
|
2
|
+
import type { RsbuildPlugin, NormalizedConfig } from '../../types';
|
|
3
3
|
export declare const enableNativeCss: (config: NormalizedConfig) => boolean;
|
|
4
4
|
export declare function applyBaseCSSRule({
|
|
5
5
|
rule,
|
|
@@ -166,7 +166,7 @@ const pluginCss = () => {
|
|
|
166
166
|
const enableSourceMap = (0, import_shared.isUseCssSourceMap)(config);
|
|
167
167
|
const enableExtractCSS = (0, import_shared.isUseCssExtract)(config, utils.target);
|
|
168
168
|
if (!enableSourceMap && enableExtractCSS) {
|
|
169
|
-
const { RemoveCssSourcemapPlugin } = await Promise.resolve().then(() => __toESM(require("
|
|
169
|
+
const { RemoveCssSourcemapPlugin } = await Promise.resolve().then(() => __toESM(require("../../rspack-plugins/RemoveCssSourcemapPlugin")));
|
|
170
170
|
chain.plugin("remove-css-sourcemap").use(RemoveCssSourcemapPlugin, [utils.HtmlPlugin]);
|
|
171
171
|
}
|
|
172
172
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '
|
|
1
|
+
import type { RsbuildPlugin } from '../../types';
|
|
2
2
|
export declare const pluginHMR: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '
|
|
1
|
+
import type { RsbuildPlugin } from '../../types';
|
|
2
2
|
export declare function pluginLess(): RsbuildPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BundlerChain } from '@rsbuild/shared';
|
|
2
|
-
import type { RsbuildPlugin, NormalizedConfig } from '
|
|
2
|
+
import type { RsbuildPlugin, NormalizedConfig } from '../../types';
|
|
3
3
|
export declare function applyJSMinimizer(chain: BundlerChain, config: NormalizedConfig): void;
|
|
4
4
|
export declare function applyCSSMinimizer(chain: BundlerChain): void;
|
|
5
5
|
export declare const pluginMinimize: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '
|
|
1
|
+
import type { RsbuildPlugin } from '../../types';
|
|
2
2
|
export declare const pluginOutput: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '
|
|
1
|
+
import type { RsbuildPlugin } from '../../types';
|
|
2
2
|
export declare const pluginProgress: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '
|
|
1
|
+
import type { RsbuildPlugin } from '../../types';
|
|
2
2
|
export declare const pluginResolve: () => RsbuildPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '
|
|
1
|
+
import type { RsbuildPlugin } from '../../types';
|
|
2
2
|
import inspector from 'inspector';
|
|
3
3
|
export declare const stopProfiler: (output: string, profileSession?: inspector.Session) => void;
|
|
4
4
|
export declare const pluginRspackProfile: () => RsbuildPlugin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '
|
|
1
|
+
import type { RsbuildPlugin } from '../../types';
|
|
2
2
|
export declare function pluginSass(): RsbuildPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RsbuildTarget, type BuiltinSwcLoaderOptions } from '@rsbuild/shared';
|
|
2
|
-
import type { RsbuildPlugin, NormalizedConfig } from '
|
|
2
|
+
import type { RsbuildPlugin, NormalizedConfig } from '../../types';
|
|
3
3
|
export declare function getDefaultSwcConfig(config: NormalizedConfig, rootPath: string, target: RsbuildTarget): Promise<BuiltinSwcLoaderOptions>;
|
|
4
4
|
/**
|
|
5
5
|
* Provide some swc configs of rspack
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RsbuildProvider, type RspackConfig, type RspackCompiler, type RspackMultiCompiler } from '@rsbuild/shared';
|
|
2
|
-
import type { RsbuildConfig, NormalizedConfig } from '
|
|
2
|
+
import type { RsbuildConfig, NormalizedConfig } from '../types';
|
|
3
3
|
export type RspackProvider = RsbuildProvider<RsbuildConfig, RspackConfig, NormalizedConfig, RspackCompiler | RspackMultiCompiler>;
|
|
4
4
|
export declare function rspackProvider({
|
|
5
5
|
rsbuildConfig: originalRsbuildConfig
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Context as BaseContext, RsbuildConfig, NormalizedConfig, DefaultRsbuildPluginAPI, RsbuildPlugin as BaseRsbuildPlugin } from '@rsbuild/shared';
|
|
2
|
+
import type { Hooks } from './rspack-provider/core/initHooks';
|
|
3
|
+
import type { RspackConfig, RspackCompiler, RspackMultiCompiler } from '@rsbuild/shared';
|
|
4
|
+
export interface RsbuildPluginAPI extends DefaultRsbuildPluginAPI<RsbuildConfig, NormalizedConfig, RspackConfig, RspackCompiler | RspackMultiCompiler> {}
|
|
5
|
+
export type RsbuildPlugin<T = RsbuildPluginAPI> = BaseRsbuildPlugin<T>;
|
|
6
|
+
/** The inner context. */
|
|
7
|
+
export type Context = BaseContext & {
|
|
8
|
+
/** All hooks. */
|
|
9
|
+
hooks: Readonly<Hooks>;
|
|
10
|
+
/** Current Rsbuild config. */
|
|
11
|
+
config: Readonly<RsbuildConfig>;
|
|
12
|
+
/** The original Rsbuild config passed from the createRsbuild method. */
|
|
13
|
+
originalConfig: Readonly<RsbuildConfig>;
|
|
14
|
+
/** The normalized Rsbuild config. */
|
|
15
|
+
normalizedConfig?: NormalizedConfig;
|
|
16
|
+
/** The plugin API. */
|
|
17
|
+
pluginAPI?: RsbuildPluginAPI;
|
|
18
|
+
};
|
|
19
|
+
export type { RsbuildConfig, NormalizedConfig, DevConfig, HtmlConfig, ToolsConfig, SourceConfig, OutputConfig, SecurityConfig, PerformanceConfig, NormalizedDevConfig, NormalizedHtmlConfig, NormalizedToolsConfig, NormalizedSourceConfig, NormalizedOutputConfig, NormalizedSecurityConfig, NormalizedPerformanceConfig } from '@rsbuild/shared';
|
|
@@ -12,5 +12,5 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
12
12
|
return to;
|
|
13
13
|
};
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var
|
|
16
|
-
module.exports = __toCommonJS(
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "Unleash the power of Rspack with the out-of-the-box build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"types.d.ts"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@rspack/core": "0.3.
|
|
61
|
+
"@rspack/core": "0.3.14",
|
|
62
62
|
"core-js": "~3.32.2",
|
|
63
63
|
"html-webpack-plugin": "npm:html-rspack-plugin@5.5.5",
|
|
64
64
|
"http-proxy-middleware": "^2.0.1",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"semver": "^7.5.4",
|
|
68
68
|
"sirv": "^2.0.3",
|
|
69
69
|
"ws": "^8.2.0",
|
|
70
|
-
"@rsbuild/shared": "0.0.
|
|
70
|
+
"@rsbuild/shared": "0.0.25"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/node": "^16",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Context as BaseContext, RsbuildConfig, NormalizedConfig } from '@rsbuild/shared';
|
|
2
|
-
import type { Hooks } from '../core/initHooks';
|
|
3
|
-
import type { RsbuildPluginAPI } from './plugin';
|
|
4
|
-
/** The inner context. */
|
|
5
|
-
export type Context = BaseContext & {
|
|
6
|
-
/** All hooks. */
|
|
7
|
-
hooks: Readonly<Hooks>;
|
|
8
|
-
/** Current Rsbuild config. */
|
|
9
|
-
config: Readonly<RsbuildConfig>;
|
|
10
|
-
/** The original Rsbuild config passed from the createRsbuild method. */
|
|
11
|
-
originalConfig: Readonly<RsbuildConfig>;
|
|
12
|
-
/** The normalized Rsbuild config. */
|
|
13
|
-
normalizedConfig?: NormalizedConfig;
|
|
14
|
-
/** The plugin API. */
|
|
15
|
-
pluginAPI?: RsbuildPluginAPI;
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var context_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(context_exports);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export * from './plugin';
|
|
2
|
-
export * from './context';
|
|
3
|
-
export type { RsbuildConfig, NormalizedConfig, DevConfig, HtmlConfig, ToolsConfig, SourceConfig, OutputConfig, SecurityConfig, PerformanceConfig, NormalizedDevConfig, NormalizedHtmlConfig, NormalizedToolsConfig, NormalizedSourceConfig, NormalizedOutputConfig, NormalizedSecurityConfig, NormalizedPerformanceConfig } from '@rsbuild/shared';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
var types_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(types_exports);
|
|
18
|
-
__reExport(types_exports, require("./plugin"), module.exports);
|
|
19
|
-
__reExport(types_exports, require("./context"), module.exports);
|
|
20
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
-
0 && (module.exports = {
|
|
22
|
-
...require("./plugin"),
|
|
23
|
-
...require("./context")
|
|
24
|
-
});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { RsbuildConfig, NormalizedConfig, DefaultRsbuildPluginAPI, RsbuildPlugin as BaseRsbuildPlugin } from '@rsbuild/shared';
|
|
2
|
-
import type { RspackConfig, RspackCompiler, RspackMultiCompiler } from '@rsbuild/shared';
|
|
3
|
-
export interface RsbuildPluginAPI extends DefaultRsbuildPluginAPI<RsbuildConfig, NormalizedConfig, RspackConfig, RspackCompiler | RspackMultiCompiler> {}
|
|
4
|
-
export type RsbuildPlugin<T = RsbuildPluginAPI> = BaseRsbuildPlugin<T>;
|