diff --git a/docs/content/guides/7.multistore/2.tooling-and-concepts/1.index.md b/docs/content/guides/7.multistore/2.tooling-and-concepts/1.index.md index 94883fef13..c98c57f640 100644 --- a/docs/content/guides/7.multistore/2.tooling-and-concepts/1.index.md +++ b/docs/content/guides/7.multistore/2.tooling-and-concepts/1.index.md @@ -216,6 +216,56 @@ The first matching file found is used. This allows stores to: This resolution process applies to all file types: components, styles, configurations, etc. Understanding this helps you organize your overrides effectively. ::: +#### Ignoring files + +You can ignore files from the build process by adding them to the `ignorePaths` property in the store's configuration file. + +The rules are evaluated the same way as the one used in the .gitignore files. Ignore rules of a store merge with the ignore rules of its parents, where the ignore rules of the parent store are applied first. + +That means that if you have inheritance hierarchy like this: + +```bash +apps/ +├── storefront-unified-nextjs/ +└── stores/ + ├── fashion/ + └── sports-brand/ + ├── storefront-unified-nextjs/ + └── stores/ + ├── us-store/ + └── eu-store/ +``` +Where the base brand comes with `app/[locale]/my-account.tsx` page but you don't want to have it in the `us-store` and `sports-brand` stores but while still keeping it in `eu-store`. Then you can modify your `alokai.config.json` to ignore it in the `us-store` and `sports-brand` stores but not in `eu-store`: + +```diff +{ + "stores": { + ... + "sports-brand": { + ... ++ "ignorePaths": [ "app/[locale]/my-account.tsx" ] + }, + "eu-store": { ++ "ignorePaths": [ "!app/[locale]/my-account.tsx" ] + } + } +} +``` + +The result will be that the ignore rules of `us-store` and `sports-brand` will be look as follows: + +```bash +app/[locale]/my-account.tsx +``` + +while the ignore rules of `eu-store` will be look as follows: + +```bash +app/[locale]/my-account.tsx # inherits the rule from the sports-brand store +!app/[locale]/my-account.tsx # but we ignore it here +``` + + ## Technical Implementation ### TypeScript Configuration diff --git a/docs/content/guides/7.multistore/2.tooling-and-concepts/2.development/3.managing-the-stores.md b/docs/content/guides/7.multistore/2.tooling-and-concepts/2.development/3.managing-the-stores.md index 3e5ecc99e1..ed85408762 100644 --- a/docs/content/guides/7.multistore/2.tooling-and-concepts/2.development/3.managing-the-stores.md +++ b/docs/content/guides/7.multistore/2.tooling-and-concepts/2.development/3.managing-the-stores.md @@ -94,7 +94,8 @@ For deployable stores, the CLI adds a new entry with default settings. All of th "nextjs": 3001, // Port for Next.js development "nuxt": 3334 // Port for Nuxt development }, - "localDomain": "my-brand-us.local" // Domain for local development, when using `with-local-domains` flag + "localDomain": "my-brand-us.local", // Domain for local development, when using `with-local-domains` flag, + "ignorePaths": ["my-brand-us.json"] // Files to ignore when building the store } } }