@rsbuild/webpack 0.2.10 → 0.2.12

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.
@@ -1,9 +1,9 @@
1
1
  import { type Rspack } from '@rsbuild/shared';
2
- import type { Context } from '@rsbuild/core/provider';
2
+ import type { InternalContext } from '@rsbuild/core/provider';
3
3
  import type { WebpackConfig } from '../types';
4
4
  import { InitConfigsOptions } from './initConfigs';
5
5
  export declare function createCompiler({ context, webpackConfigs, }: {
6
- context: Context;
6
+ context: InternalContext;
7
7
  webpackConfigs: WebpackConfig[];
8
8
  }): Promise<Rspack.Compiler | Rspack.MultiCompiler>;
9
9
  export declare function createDevMiddleware(options: InitConfigsOptions, customCompiler?: Rspack.Compiler | Rspack.MultiCompiler): Promise<{
@@ -1,3 +1,3 @@
1
1
  import type { Compiler, MultiCompiler } from 'webpack';
2
- import { DevMiddleware } from '@rsbuild/shared';
2
+ import { type DevMiddleware } from '@rsbuild/shared';
3
3
  export declare const getDevMiddleware: (compiler: Compiler | MultiCompiler) => NonNullable<DevMiddleware>;
@@ -1,8 +1,8 @@
1
1
  import { type PluginStore, type CreateRsbuildOptions } from '@rsbuild/shared';
2
- import { type Context } from '@rsbuild/core/provider';
2
+ import { type InternalContext } from '@rsbuild/core/provider';
3
3
  import type { WebpackConfig } from '../types';
4
4
  export type InitConfigsOptions = {
5
- context: Context;
5
+ context: InternalContext;
6
6
  pluginStore: PluginStore;
7
7
  rsbuildOptions: Required<CreateRsbuildOptions>;
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import { type RsbuildTarget } from '@rsbuild/shared';
2
- import type { Context } from '@rsbuild/core/provider';
2
+ import type { InternalContext } from '@rsbuild/core/provider';
3
3
  import type { WebpackConfig } from '../types';
4
4
  export declare function generateWebpackConfig({ target, context, }: {
5
5
  target: RsbuildTarget;
6
- context: Context;
6
+ context: InternalContext;
7
7
  }): Promise<WebpackConfig>;
@@ -1,8 +1,8 @@
1
- import { ModifyChainUtils, type Context, type RsbuildPlugin, type NormalizedConfig, type BundlerChainRule } from '@rsbuild/shared';
1
+ import { ModifyChainUtils, type RsbuildContext, type RsbuildPlugin, type NormalizedConfig, type BundlerChainRule } from '@rsbuild/shared';
2
2
  export declare function applyBaseCSSRule({ rule, config, context, utils: { target, isProd, isServer, CHAIN_ID, isWebWorker }, importLoaders, }: {
3
3
  rule: BundlerChainRule;
4
4
  config: NormalizedConfig;
5
- context: Context;
5
+ context: RsbuildContext;
6
6
  utils: ModifyChainUtils;
7
7
  importLoaders?: number;
8
8
  }): Promise<void>;
package/dist/shared.js CHANGED
@@ -68,7 +68,7 @@ const applyDefaultPlugins = (plugins) => (0, import_shared2.awaitableGetter)([
68
68
  plugins.performance(),
69
69
  plugins.networkPerformance(),
70
70
  plugins.preloadOrPrefetch(),
71
- Promise.resolve().then(() => __toESM(require("./plugins/server"))).then((m) => m.pluginServer())
71
+ plugins.server()
72
72
  ]);
73
73
  const getCompiledPath = (packageName) => {
74
74
  const providerCompilerPath = (0, import_path.join)(__dirname, "../../compiled", packageName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/webpack",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "homepage": "https://rsbuild.dev",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,13 +37,13 @@
37
37
  "tsconfig-paths-webpack-plugin": "4.1.0",
38
38
  "webpack": "^5.89.0",
39
39
  "webpack-chain": "^6.5.1",
40
- "@rsbuild/core": "0.2.10",
41
- "@rsbuild/shared": "0.2.10"
40
+ "@rsbuild/core": "0.2.12",
41
+ "@rsbuild/shared": "0.2.12"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "16.x",
45
45
  "typescript": "^5.3.0",
46
- "@rsbuild/test-helper": "0.2.10"
46
+ "@rsbuild/test-helper": "0.2.12"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public",