Skip to content

Commit cad6c5f

Browse files
committed
fix: integration config code snippet
1 parent 302d227 commit cad6c5f

File tree

1 file changed

+12
-19
lines changed
  • docs/content/guides/7.multistore/3.patterns/5.subpath

1 file changed

+12
-19
lines changed

Diff for: docs/content/guides/7.multistore/3.patterns/5.subpath/1.subpath.md

+12-19
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ This section provides a brief overview of setting up Config Switcher. For comple
5050

5151
`ConfigSwitcher` operates differently from file-based inheritance:
5252

53-
| **File-Based Inheritance** | **Config Switcher** |
54-
| --------------------------------------- | ---------------------------------------------------------------- |
55-
| Creates separate deployable instances | Uses a single deployable instance |
56-
| Provides inheritance mechanism to make managing multiple stores easy | You have to manage codebase reuse between stores on your own |
57-
| Requires separate builds for each store | Single build supports multiple configurations |
53+
| **File-Based Inheritance** | **Config Switcher** |
54+
| -------------------------------------------------------------------- | ------------------------------------------------------------ |
55+
| Creates separate deployable instances | Uses a single deployable instance |
56+
| Provides inheritance mechanism to make managing multiple stores easy | You have to manage codebase reuse between stores on your own |
57+
| Requires separate builds for each store | Single build supports multiple configurations |
5858

5959
Take a look at the diagram to see the difference:
6060

@@ -96,20 +96,13 @@ Then add this extension to your integration configuration:
9696
// apps/storefront-middleware/integrations/<integration-name>/config.ts
9797
import { configSwitcherExtension } from './extensions/configSwitcher';
9898

99-
export default {
100-
integrations: {
101-
<integration-name>: {
102-
// Base configuration shared across all stores
103-
configuration: {
104-
// ...
105-
},
106-
extensions: (predefinedExtensions) => [
107-
...predefinedExtensions,
108-
configSwitcherExtension,
109-
]
110-
}
111-
}
112-
};
99+
export const config = {
100+
configuration: {},
101+
extensions: (extensions: ApiClientExtension[]) => [
102+
...extensions,
103+
],
104+
location: '@vsf-enterprise/<integration-name>/server',
105+
} satisfies Integration<Config>;
113106
```
114107

115108
## Customizing Store Appearance with CSS Variables

0 commit comments

Comments
 (0)