@octanejs/rsbuild-plugin 0.1.69 → 0.2.1

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
@@ -7,7 +7,7 @@ client/server environments, preview, and deployment adapters.
7
7
  ## Install
8
8
 
9
9
  ```sh
10
- pnpm add octane @octanejs/rsbuild-plugin @tsrx/oxc@0.20.0
10
+ pnpm add octane @octanejs/rsbuild-plugin @tsrx/oxc@0.23.0
11
11
  pnpm add -D @rsbuild/core
12
12
  ```
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/rsbuild-plugin",
3
- "version": "0.1.69",
3
+ "version": "0.2.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -45,22 +45,27 @@
45
45
  "types": "./types/node.d.ts",
46
46
  "import": "./src/node.js",
47
47
  "default": "./src/node.js"
48
+ },
49
+ "./seeds": {
50
+ "types": "./types/seeds.d.ts",
51
+ "import": "./src/seeds.js",
52
+ "default": "./src/seeds.js"
48
53
  }
49
54
  },
50
55
  "dependencies": {
51
- "@octanejs/app-core": "0.2.0",
52
- "@octanejs/rspack-plugin": "0.2.8"
56
+ "@octanejs/app-core": "0.3.1",
57
+ "@octanejs/rspack-plugin": "0.2.10"
53
58
  },
54
59
  "peerDependencies": {
55
60
  "@rsbuild/core": "^2.0.0",
56
- "octane": "^0.16.0"
61
+ "octane": "^0.18.0"
57
62
  },
58
63
  "devDependencies": {
59
64
  "@rsbuild/core": "^2.1.6",
60
65
  "@rsbuild/plugin-react": "2.1.0",
61
66
  "@rspack/core": "^2.1.4",
62
67
  "@types/node": "^24.13.3",
63
- "octane": "0.16.0",
68
+ "octane": "0.18.0",
64
69
  "playwright": "^1.61.1",
65
70
  "vitest": "^4.1.10"
66
71
  }
package/src/index.js CHANGED
@@ -171,10 +171,12 @@ function configSignature(config, strongOverride) {
171
171
  ),
172
172
  preHydrate: config.router.preHydrate,
173
173
  rootBoundary: config.rootBoundary,
174
+ data: config.data,
174
175
  server: config.server,
175
176
  compiler: {
176
177
  renderers: config.compiler.renderers.signature,
177
178
  strong: strongOverride ?? config.compiler.strong,
179
+ strongDependencies: config.compiler.strongDependencies,
178
180
  },
179
181
  });
180
182
  }
@@ -287,6 +289,7 @@ export function pluginOctane(inlineOptions = {}) {
287
289
  const initialConfig = initialLoaded?.config ?? null;
288
290
  assertSupportedHydration(initialConfig);
289
291
  const strong = inlineOptions.strong ?? initialConfig?.compiler.strong;
292
+ const strongDependencies = initialConfig?.compiler.strongDependencies;
290
293
  const appEnabled = hasRoutes(initialConfig);
291
294
  const buildTargetPlan =
292
295
  initialConfig?.build.target === undefined
@@ -296,6 +299,7 @@ export function pluginOctane(inlineOptions = {}) {
296
299
  ? createOctaneCompiler({
297
300
  root,
298
301
  ...(strong === undefined ? null : { strong }),
302
+ ...(strongDependencies === undefined ? null : { strongDependencies }),
299
303
  })
300
304
  : null;
301
305
  let currentConfig = initialConfig;
@@ -515,6 +519,9 @@ export function pluginOctane(inlineOptions = {}) {
515
519
  staticEntries: entries,
516
520
  clientBuildIdExpression: '__webpack_hash__',
517
521
  generatedBy: PLUGIN_NAME,
522
+ data: Boolean(loaded.config.data),
523
+ dataRootModuleId: localRequire.resolve('@octanejs/app-core/data-root'),
524
+ seedsModuleId: localRequire.resolve('@octanejs/app-core/seeds'),
518
525
  });
519
526
  },
520
527
  );
@@ -551,6 +558,8 @@ export function pluginOctane(inlineOptions = {}) {
551
558
  octaneConfigPath: loaded.configPath,
552
559
  configImportPath: loaded.configPath,
553
560
  rootBoundary: loaded.config.rootBoundary,
561
+ data: loaded.config.data,
562
+ dataRootModuleId: localRequire.resolve('@octanejs/app-core/data-root'),
554
563
  rpcModulePaths: serverModules.ids,
555
564
  ...(webWorkerServer ? { mode: 'webworker' } : null),
556
565
  ...(production && !webWorkerServer
@@ -599,6 +608,7 @@ export function pluginOctane(inlineOptions = {}) {
599
608
  ? null
600
609
  : { textTypes: inlineOptions.textTypes }),
601
610
  ...(strong === undefined ? null : { strong }),
611
+ ...(strongDependencies === undefined ? null : { strongDependencies }),
602
612
  ...(inlineOptions.hmr === undefined ? null : { hmr: inlineOptions.hmr }),
603
613
  ...(inlineOptions.profile === undefined
604
614
  ? null
package/src/project.js CHANGED
@@ -166,6 +166,7 @@ export function collectClientEntries(config) {
166
166
  .filter((route) => route.type === 'render')
167
167
  .flatMap((route) => [get_route_entry_path(route.entry), route.layout]);
168
168
  if (config.router.preHydrate) entries.push(config.router.preHydrate);
169
+ if (config.data) entries.push(config.data);
169
170
  entries.push(
170
171
  get_route_entry_path(config.rootBoundary.pending),
171
172
  get_route_entry_path(config.rootBoundary.catch),
package/src/seeds.js ADDED
@@ -0,0 +1 @@
1
+ export { readRouteSeed, routeSeed } from '@octanejs/app-core/seeds';
@@ -0,0 +1 @@
1
+ export * from '@octanejs/app-core/seeds';