@rsbuild/webpack 0.7.0-beta.0 → 0.7.0-beta.2
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/index.d.ts +7 -2
- package/package.json +4 -4
- package/dist/build.d.ts +0 -3
- package/dist/createCompiler.d.ts +0 -12
- package/dist/initConfigs.d.ts +0 -11
- package/dist/inspectConfig.d.ts +0 -7
- package/dist/plugins/copy.d.ts +0 -2
- package/dist/plugins/progress.d.ts +0 -2
- package/dist/plugins/resolve.d.ts +0 -2
- package/dist/progress/ProgressPlugin.d.ts +0 -13
- package/dist/progress/helpers/bar.d.ts +0 -5
- package/dist/progress/helpers/bus.d.ts +0 -17
- package/dist/progress/helpers/index.d.ts +0 -4
- package/dist/progress/helpers/log.d.ts +0 -9
- package/dist/progress/helpers/nonTty.d.ts +0 -9
- package/dist/progress/helpers/percentage.d.ts +0 -7
- package/dist/progress/helpers/type.d.ts +0 -23
- package/dist/progress/helpers/utils.d.ts +0 -1
- package/dist/provider.d.ts +0 -2
- package/dist/shared.d.ts +0 -1
- package/dist/types.d.ts +0 -4
- package/dist/webpackConfig.d.ts +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import { RsbuildProvider } from '@rsbuild/shared';
|
|
2
|
+
export { WebpackChain } from '@rsbuild/shared';
|
|
3
|
+
export { Configuration as WebpackConfig, default as webpack } from 'webpack';
|
|
4
|
+
|
|
5
|
+
declare const webpackProvider: RsbuildProvider<'webpack'>;
|
|
6
|
+
|
|
7
|
+
export { webpackProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "0.7.0-beta.
|
|
3
|
+
"version": "0.7.0-beta.2",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"postcss": "^8.4.38",
|
|
29
29
|
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
30
30
|
"webpack": "^5.91.0",
|
|
31
|
-
"@rsbuild/core": "0.7.0-beta.
|
|
32
|
-
"@rsbuild/shared": "0.7.0-beta.
|
|
31
|
+
"@rsbuild/core": "0.7.0-beta.2",
|
|
32
|
+
"@rsbuild/shared": "0.7.0-beta.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "18.x",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"cli-truncate": "2.1.0",
|
|
38
38
|
"patch-console": "1.0.0",
|
|
39
39
|
"typescript": "^5.4.2",
|
|
40
|
-
"@scripts/test-helper": "0.7.0-beta.
|
|
40
|
+
"@scripts/test-helper": "0.7.0-beta.2"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public",
|
package/dist/build.d.ts
DELETED
package/dist/createCompiler.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type InternalContext } from '@rsbuild/core/internal';
|
|
2
|
-
import { type Rspack } from '@rsbuild/shared';
|
|
3
|
-
import { type InitConfigsOptions } from './initConfigs';
|
|
4
|
-
import type { WebpackConfig } from './types';
|
|
5
|
-
export declare function createCompiler({ context, webpackConfigs, }: {
|
|
6
|
-
context: InternalContext;
|
|
7
|
-
webpackConfigs: WebpackConfig[];
|
|
8
|
-
}): Promise<Rspack.Compiler | Rspack.MultiCompiler>;
|
|
9
|
-
export declare function createDevMiddleware(options: InitConfigsOptions, customCompiler?: Rspack.Compiler | Rspack.MultiCompiler): Promise<{
|
|
10
|
-
devMiddleware: import("@rsbuild/shared").DevMiddleware;
|
|
11
|
-
compiler: Rspack.Compiler | Rspack.MultiCompiler;
|
|
12
|
-
}>;
|
package/dist/initConfigs.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type InternalContext } from '@rsbuild/core/internal';
|
|
2
|
-
import { type CreateRsbuildOptions, type PluginManager } from '@rsbuild/shared';
|
|
3
|
-
import type { WebpackConfig } from './types';
|
|
4
|
-
export type InitConfigsOptions = {
|
|
5
|
-
context: InternalContext;
|
|
6
|
-
pluginManager: PluginManager;
|
|
7
|
-
rsbuildOptions: Required<CreateRsbuildOptions>;
|
|
8
|
-
};
|
|
9
|
-
export declare function initConfigs({ context, pluginManager, rsbuildOptions, }: InitConfigsOptions): Promise<{
|
|
10
|
-
webpackConfigs: WebpackConfig[];
|
|
11
|
-
}>;
|
package/dist/inspectConfig.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type InspectConfigOptions, type InspectConfigResult } from '@rsbuild/shared';
|
|
2
|
-
import { type InitConfigsOptions } from './initConfigs';
|
|
3
|
-
import type { WebpackConfig } from './types';
|
|
4
|
-
export declare function inspectConfig({ context, pluginManager, rsbuildOptions, bundlerConfigs, inspectOptions, }: InitConfigsOptions & {
|
|
5
|
-
inspectOptions?: InspectConfigOptions;
|
|
6
|
-
bundlerConfigs?: WebpackConfig[];
|
|
7
|
-
}): Promise<InspectConfigResult<'webpack'>>;
|
package/dist/plugins/copy.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import type { Props } from './helpers/type';
|
|
3
|
-
export interface ProgressOptions extends Omit<Partial<Props>, 'message' | 'total' | 'current' | 'done'> {
|
|
4
|
-
id?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class ProgressPlugin extends webpack.ProgressPlugin {
|
|
7
|
-
readonly name: string;
|
|
8
|
-
id: string;
|
|
9
|
-
hasCompileErrors: boolean;
|
|
10
|
-
compileTime: string | null;
|
|
11
|
-
constructor(options: ProgressOptions);
|
|
12
|
-
apply(compiler: webpack.Compiler): void;
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { LogUpdate } from './log';
|
|
2
|
-
import type { Props } from './type';
|
|
3
|
-
declare class Bus {
|
|
4
|
-
states: Partial<Props>[];
|
|
5
|
-
log: LogUpdate;
|
|
6
|
-
restore: () => void;
|
|
7
|
-
prevOutput: string;
|
|
8
|
-
destroyed: boolean;
|
|
9
|
-
constructor();
|
|
10
|
-
update(state: Partial<Props>): void;
|
|
11
|
-
writeToStd(type?: 'stdout' | 'stderr', data?: string): void;
|
|
12
|
-
render(): void;
|
|
13
|
-
destroy(): void;
|
|
14
|
-
clear(): void;
|
|
15
|
-
}
|
|
16
|
-
declare const bus: Bus;
|
|
17
|
-
export { bus };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make the progress percentage more user friendly.
|
|
3
|
-
* The original percentage may pause at certain number for a long time,
|
|
4
|
-
* or decrease in some cases, which will confuse the user.
|
|
5
|
-
* So we format the percentage number and display a more smooth percentage.
|
|
6
|
-
*/
|
|
7
|
-
export declare const createFriendlyPercentage: () => (percentage: number) => number;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Colors } from '@rsbuild/shared';
|
|
2
|
-
export type Props = {
|
|
3
|
-
total: number;
|
|
4
|
-
current: number;
|
|
5
|
-
color: Colors;
|
|
6
|
-
bgColor: Colors;
|
|
7
|
-
char: string;
|
|
8
|
-
width: number;
|
|
9
|
-
buildIcon: string;
|
|
10
|
-
errorIcon: string;
|
|
11
|
-
errorInfo: string;
|
|
12
|
-
message: string;
|
|
13
|
-
done: boolean;
|
|
14
|
-
messageWidth: number;
|
|
15
|
-
spaceWidth: number;
|
|
16
|
-
messageColor: Colors;
|
|
17
|
-
id: string;
|
|
18
|
-
maxIdLen: number;
|
|
19
|
-
hasErrors: boolean;
|
|
20
|
-
};
|
|
21
|
-
export type BusOption = {
|
|
22
|
-
state: Props[];
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const clamp: (x: number, min: number, max: number) => number;
|
package/dist/provider.d.ts
DELETED
package/dist/shared.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getCompiledPath: (packageName: string) => string;
|
package/dist/types.d.ts
DELETED
package/dist/webpackConfig.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type InternalContext } from '@rsbuild/core/internal';
|
|
2
|
-
import { type RsbuildTarget } from '@rsbuild/shared';
|
|
3
|
-
import type { WebpackConfig } from './types';
|
|
4
|
-
export declare function generateWebpackConfig({ target, context, }: {
|
|
5
|
-
target: RsbuildTarget;
|
|
6
|
-
context: InternalContext;
|
|
7
|
-
}): Promise<WebpackConfig>;
|