@alphasquad/saleor-template-advance 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/next.config.ts +2 -2
  2. package/package.json +1 -1
package/next.config.ts CHANGED
@@ -53,7 +53,7 @@ function getRemoteImageHosts(): string[] {
53
53
  // When running via @alphasquad/create-saleor-storefront CLI wrapper,
54
54
  // process.cwd() is the tenant root. The tenant can place override components
55
55
  // in src/overrides/ which the template will use instead of its defaults.
56
- const tenantRoot = process.cwd();
56
+ const tenantRoot = process.env.NEXT_TENANT_ROOT || process.cwd();
57
57
  const tenantOverridesIndex = path.join(tenantRoot, "src", "overrides", "index.ts");
58
58
  const tenantOverridesDir = path.join(tenantRoot, "src", "overrides");
59
59
  const hasTenantOverrides =
@@ -62,7 +62,7 @@ const hasTenantOverrides =
62
62
  fs.existsSync(tenantOverridesIndex.replace(".ts", ".js"));
63
63
 
64
64
  // Create symlink for Turbopack to access tenant overrides outside project root
65
- const templateSrcDir = path.join(__dirname, "src");
65
+ const templateSrcDir = path.join(tenantRoot, "src");
66
66
  const tenantSymlinkPath = path.join(templateSrcDir, "tenant-overrides");
67
67
  if (hasTenantOverrides && !fs.existsSync(tenantSymlinkPath)) {
68
68
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alphasquad/saleor-template-advance",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "scripts": {
5
5
  "dev": "next dev --turbopack",
6
6
  "build": "next build",