mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
Updated exports and commerce config
This commit is contained in:
parent
32c60e9248
commit
39db23da17
@ -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"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -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=
|
||||
|
@ -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,
|
||||
|
@ -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"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user