@@ -50,11 +50,11 @@ This section provides a brief overview of setting up Config Switcher. For comple
50
50
51
51
` ConfigSwitcher ` operates differently from file-based inheritance:
52
52
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 |
58
58
59
59
Take a look at the diagram to see the difference:
60
60
@@ -96,20 +96,13 @@ Then add this extension to your integration configuration:
96
96
// apps/storefront-middleware/integrations/<integration-name>/config.ts
97
97
import { configSwitcherExtension } from ' ./extensions/configSwitcher' ;
98
98
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 >;
113
106
```
114
107
115
108
## Customizing Store Appearance with CSS Variables
0 commit comments