Skip to content

Commit 1018910

Browse files
committed
docs: generalize import config example
1 parent 13b8c7d commit 1018910

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/superpowers/specs/2026-06-17-tree-shaking-service-file-import-config-design.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,11 @@ only if the implementation touches standalone-specific behavior. The public
312312
standalone config uses the same `QraftTreeShakeOptions` type, so core transform
313313
tests are the primary contract.
314314

315-
## React Client Fixture Config
315+
## Example Generated Layout Config
316316

317-
After the transform supports the new fields,
318-
`packages/react-client/qraft-tree-shake.config.ts` should configure the
319-
embedded files API entrypoint with:
317+
For a generated API root where service files are emitted without the default
318+
`Service` postfix and public ESM imports require `.js`, configure the
319+
entrypoint explicitly:
320320

321321
```ts
322322
services: {
@@ -325,15 +325,15 @@ services: {
325325
},
326326
reactContext: {
327327
exportName: "InternalReactAPIClientContext",
328-
moduleSpecifier: `${filesApiModule}/index`,
328+
moduleSpecifier: "./generated-api/index",
329329
importExtension: ".js",
330330
}
331331
```
332332

333333
This mirrors the generated fixture shape where files live at
334-
`services/Files.ts` and public ESM imports point at `services/Files.js`.
335-
The context module also needs an emitted `.js` specifier when configured through
336-
a path-like generated-client module.
334+
`services/Files.ts` and public ESM imports point at `services/Files.js`. The
335+
context module also needs an emitted `.js` specifier when configured through a
336+
path-like generated-client module.
337337

338338
## Success Criteria
339339

0 commit comments

Comments
 (0)