@octanejs/rsbuild-plugin 0.1.34 → 0.1.36

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/README.md CHANGED
@@ -78,11 +78,17 @@ applications remain responsible for any additional Web API polyfills they use.
78
78
  Options are declarative and cache-stable:
79
79
 
80
80
  - `hmr` controls browser component handoff;
81
+ - `parallel` controls compiler workers; the default uses up to four, `false`
82
+ compiles on the main thread, and `{ maxWorkers: 2 }` requests a custom limit;
81
83
  - `profile` enables component profiling in the browser environment;
82
84
  - `strong` overrides the app's `compiler.strong` setting;
83
85
  - `exclude` skips path fragments in the plain `.ts`/`.js` hook-slot pass; and
84
86
  - `clientEnvironment` / `serverEnvironment` rename the generated environments.
85
87
 
88
+ Rspack shares one loader worker pool per process, so the first parallel loader
89
+ determines its effective size. Worker startup has a fixed cost, so very small
90
+ builds may be faster with `parallel: false`.
91
+
86
92
  Enable Strong mode for the whole app in `octane.config.ts`:
87
93
 
88
94
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/rsbuild-plugin",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -48,12 +48,12 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@octanejs/app-core": "0.0.35",
52
- "@octanejs/rspack-plugin": "0.1.34"
51
+ "@octanejs/app-core": "0.0.37",
52
+ "@octanejs/rspack-plugin": "0.1.36"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@rsbuild/core": "^2.0.0",
56
- "octane": "0.1.39"
56
+ "octane": "0.1.41"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@rsbuild/core": "^2.1.6",
@@ -63,6 +63,6 @@
63
63
  "playwright": "^1.61.1",
64
64
  "type-fest": "^5.8.0",
65
65
  "vitest": "^4.1.10",
66
- "octane": "0.1.39"
66
+ "octane": "0.1.41"
67
67
  }
68
68
  }
package/src/index.js CHANGED
@@ -233,6 +233,7 @@ function assertRootPublicPaths(config, clientEnvironment) {
233
233
  *
234
234
  * @param {{
235
235
  * hmr?: boolean,
236
+ * parallel?: boolean | { maxWorkers?: number },
236
237
  * profile?: boolean,
237
238
  * strong?: boolean,
238
239
  * exclude?: string[],
@@ -546,6 +547,7 @@ export function pluginOctane(inlineOptions = {}) {
546
547
  root,
547
548
  environment,
548
549
  transpile: false,
550
+ ...(inlineOptions.parallel === undefined ? null : { parallel: inlineOptions.parallel }),
549
551
  ...(strong === undefined ? null : { strong }),
550
552
  ...(inlineOptions.hmr === undefined ? null : { hmr: inlineOptions.hmr }),
551
553
  ...(inlineOptions.profile === undefined
package/types/index.d.ts CHANGED
@@ -11,6 +11,13 @@ export {
11
11
  export interface OctaneRsbuildPluginOptions {
12
12
  /** Override component HMR in the browser environment. */
13
13
  hmr?: boolean;
14
+ /**
15
+ * Compile Octane modules in Rspack worker threads. Enabled by default with
16
+ * at most four workers; set `false` to keep compilation on the main thread.
17
+ * Provide `maxWorkers` to request a different shared worker-pool limit.
18
+ * @default true
19
+ */
20
+ parallel?: boolean | { maxWorkers?: number };
14
21
  /** Enable component profiling in the browser environment. */
15
22
  profile?: boolean;
16
23
  /**