mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 07:56:59 +00:00
Updated exports and commerce config
This commit is contained in:
parent
32c60e9248
commit
39db23da17
@ -9,19 +9,17 @@
|
|||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
"*": "./dist/*",
|
"./*": "./dist/*.js",
|
||||||
"config": "./config.js"
|
"./config": "./dist/config.cjs"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
"src/*"
|
"src/*",
|
||||||
],
|
"src/*/index"
|
||||||
"api": [
|
|
||||||
"src/api/index.ts"
|
|
||||||
],
|
],
|
||||||
"config": [
|
"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=
|
COMMERCE_PROVIDER=
|
||||||
|
|
||||||
BIGCOMMERCE_STOREFRONT_API_URL=
|
BIGCOMMERCE_STOREFRONT_API_URL=
|
||||||
|
@ -8,7 +8,7 @@ const prettier = require('prettier')
|
|||||||
const core = require('@vercel/commerce/config')
|
const core = require('@vercel/commerce/config')
|
||||||
|
|
||||||
const PROVIDERS = [
|
const PROVIDERS = [
|
||||||
'local',
|
'@vercel/commerce-local',
|
||||||
'bigcommerce',
|
'bigcommerce',
|
||||||
'saleor',
|
'saleor',
|
||||||
'shopify',
|
'shopify',
|
||||||
@ -29,7 +29,7 @@ function getProviderName() {
|
|||||||
? 'shopify'
|
? 'shopify'
|
||||||
: process.env.NEXT_PUBLIC_SWELL_STORE_ID
|
: process.env.NEXT_PUBLIC_SWELL_STORE_ID
|
||||||
? 'swell'
|
? 'swell'
|
||||||
: 'local')
|
: '@vercel/commerce-local')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,8 +58,8 @@ function withCommerceConfig(nextConfig = {}) {
|
|||||||
)
|
)
|
||||||
const tsconfig = require(tsconfigPath)
|
const tsconfig = require(tsconfigPath)
|
||||||
|
|
||||||
tsconfig.compilerOptions.paths['@framework'] = [`framework/${name}`]
|
tsconfig.compilerOptions.paths['@framework'] = [`${name}`]
|
||||||
tsconfig.compilerOptions.paths['@framework/*'] = [`framework/${name}/*`]
|
tsconfig.compilerOptions.paths['@framework/*'] = [`${name}/*`]
|
||||||
|
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
tsconfigPath,
|
tsconfigPath,
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
"@components/*": ["components/*"],
|
"@components/*": ["components/*"],
|
||||||
"@commerce": ["framework/commerce"],
|
"@commerce": ["framework/commerce"],
|
||||||
"@commerce/*": ["framework/commerce/*"],
|
"@commerce/*": ["framework/commerce/*"],
|
||||||
"@framework": ["framework/local"],
|
"@framework": ["@vercel/commerce-local"],
|
||||||
"@framework/*": ["framework/local/*"]
|
"@framework/*": ["@vercel/commerce-local/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user