diff --git a/packages/commerce/package.json b/packages/commerce/package.json index c87874587..20c2b61ff 100644 --- a/packages/commerce/package.json +++ b/packages/commerce/package.json @@ -9,19 +9,17 @@ "sideEffects": false, "type": "module", "exports": { - "*": "./dist/*", - "config": "./config.js" + "./*": "./dist/*.js", + "./config": "./dist/config.cjs" }, "typesVersions": { "*": { "*": [ - "src/*" - ], - "api": [ - "src/api/index.ts" + "src/*", + "src/*/index" ], "config": [ - "dist/config.d.ts" + "dist/config.d.cts" ] } }, diff --git a/packages/commerce/src/config.js b/packages/commerce/src/config.cjs similarity index 100% rename from packages/commerce/src/config.js rename to packages/commerce/src/config.cjs diff --git a/site/.env.template b/site/.env.template index cf58e89c7..8a4d0678d 100644 --- a/site/.env.template +++ b/site/.env.template @@ -1,4 +1,5 @@ -# Available providers: local, bigcommerce, shopify, swell, saleor, spree, ordercloud, vendure, kibocommerce, commercejs +# Available providers: +# @vercel/commerce-local, bigcommerce, shopify, swell, saleor, spree, ordercloud, vendure, kibocommerce, commercejs COMMERCE_PROVIDER= BIGCOMMERCE_STOREFRONT_API_URL= diff --git a/site/commerce-config.js b/site/commerce-config.js index cc261f483..f475d59d8 100644 --- a/site/commerce-config.js +++ b/site/commerce-config.js @@ -8,7 +8,7 @@ const prettier = require('prettier') const core = require('@vercel/commerce/config') const PROVIDERS = [ - 'local', + '@vercel/commerce-local', 'bigcommerce', 'saleor', 'shopify', @@ -29,7 +29,7 @@ function getProviderName() { ? 'shopify' : process.env.NEXT_PUBLIC_SWELL_STORE_ID ? 'swell' - : 'local') + : '@vercel/commerce-local') ) } @@ -58,8 +58,8 @@ function withCommerceConfig(nextConfig = {}) { ) const tsconfig = require(tsconfigPath) - tsconfig.compilerOptions.paths['@framework'] = [`framework/${name}`] - tsconfig.compilerOptions.paths['@framework/*'] = [`framework/${name}/*`] + tsconfig.compilerOptions.paths['@framework'] = [`${name}`] + tsconfig.compilerOptions.paths['@framework/*'] = [`${name}/*`] fs.writeFileSync( tsconfigPath, diff --git a/site/tsconfig.json b/site/tsconfig.json index f9727d6a5..cd3b68ca8 100644 --- a/site/tsconfig.json +++ b/site/tsconfig.json @@ -23,8 +23,8 @@ "@components/*": ["components/*"], "@commerce": ["framework/commerce"], "@commerce/*": ["framework/commerce/*"], - "@framework": ["framework/local"], - "@framework/*": ["framework/local/*"] + "@framework": ["@vercel/commerce-local"], + "@framework/*": ["@vercel/commerce-local/*"] } }, "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],