@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 CHANGED
@@ -1,2 +1,7 @@
1
- export { webpackProvider } from './provider';
2
- export type { webpack, WebpackChain, WebpackConfig, } from './types';
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.0",
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.0",
32
- "@rsbuild/shared": "0.7.0-beta.0"
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.0"
40
+ "@scripts/test-helper": "0.7.0-beta.2"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public",
package/dist/build.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { type BuildOptions } from '@rsbuild/shared';
2
- import { type InitConfigsOptions } from './initConfigs';
3
- export declare const build: (initOptions: InitConfigsOptions, { mode, watch, compiler: customCompiler }?: BuildOptions) => Promise<void>;
@@ -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
- }>;
@@ -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
- }>;
@@ -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'>>;
@@ -1,2 +0,0 @@
1
- import type { RsbuildPlugin } from '@rsbuild/shared';
2
- export declare const pluginCopy: () => RsbuildPlugin;
@@ -1,2 +0,0 @@
1
- import { type RsbuildPlugin } from '@rsbuild/shared';
2
- export declare const pluginProgress: () => RsbuildPlugin;
@@ -1,2 +0,0 @@
1
- import { type RsbuildPlugin } from '@rsbuild/shared';
2
- export declare const pluginResolve: () => RsbuildPlugin;
@@ -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,5 +0,0 @@
1
- import type { Props } from './type';
2
- export declare const FULL_WIDTH = 70;
3
- export declare const MIDDLE_WIDTH = 40;
4
- export declare const SMALL_WIDTH = 15;
5
- export declare const renderBar: (option: Partial<Props>) => string;
@@ -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,4 +0,0 @@
1
- export * from './bus';
2
- export * from './bar';
3
- export * from './type';
4
- export * from './percentage';
@@ -1,9 +0,0 @@
1
- /// <reference types="node" />
2
- import type { Writable } from 'node:stream';
3
- export interface LogUpdate {
4
- clear: () => void;
5
- done: () => void;
6
- (str: string): void;
7
- }
8
- declare const create: (stream: Writable) => LogUpdate;
9
- export { create };
@@ -1,9 +0,0 @@
1
- export declare function createNonTTYLogger(): {
2
- log: ({ id, done, current, hasErrors, compileTime, }: {
3
- id: string;
4
- done: boolean;
5
- current: number;
6
- hasErrors: boolean;
7
- compileTime: string | null;
8
- }) => void;
9
- };
@@ -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;
@@ -1,2 +0,0 @@
1
- import { type RsbuildProvider } from '@rsbuild/shared';
2
- export declare const webpackProvider: RsbuildProvider<'webpack'>;
package/dist/shared.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const getCompiledPath: (packageName: string) => string;
package/dist/types.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import type { WebpackChain } from '@rsbuild/shared';
2
- import type webpack from 'webpack';
3
- import type { Configuration as WebpackConfig } from 'webpack';
4
- export type { webpack, WebpackChain, WebpackConfig };
@@ -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>;