mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 23:16:59 +00:00
Saleor was not in the providers list
This commit is contained in:
parent
a17e0f8309
commit
55f3a432b8
@ -4,7 +4,7 @@ import fetch from './fetch'
|
||||
import { API_URL } from '../../const'
|
||||
import { getError } from '../../utils/handle-fetch-response'
|
||||
import { getCommerceApi } from '..'
|
||||
import { getToken } from '@framework/utils'
|
||||
import { getToken } from '../../utils/index'
|
||||
|
||||
const fetchGraphqlApi: GraphQLFetcher = async (query: string, { variables } = {}, fetchOptions) => {
|
||||
const config = getCommerceApi().getConfig()
|
||||
|
@ -9,6 +9,7 @@ import { Layout } from '@components/common'
|
||||
import getSlug from '@lib/get-slug'
|
||||
import { missingLocaleInPages } from '@lib/usage-warns'
|
||||
import type { Page } from '@commerce/types/page'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
export async function getStaticProps({
|
||||
preview,
|
||||
|
11
tsconfig.js
11
tsconfig.js
@ -1,4 +1,4 @@
|
||||
const PROVIDERS = ['bigcommerce', 'shopify', 'swell', 'vendure']
|
||||
const PROVIDERS = ['bigcommerce', 'shopify', 'swell', 'vendure', 'saleor']
|
||||
|
||||
function getProviderName() {
|
||||
return (
|
||||
@ -14,6 +14,9 @@ function getProviderName() {
|
||||
}
|
||||
|
||||
const name = getProviderName()
|
||||
const EXCLUDED_PROVIDERS = PROVIDERS.filter((p) => p !== name).map(
|
||||
(p) => `./framework/${p}`
|
||||
)
|
||||
|
||||
module.exports = {
|
||||
compilerOptions: {
|
||||
@ -47,10 +50,8 @@ module.exports = {
|
||||
include: ['next-env.d.ts', '**/*.d.ts', '**/*.ts', '**/*.tsx', '**/*.js'],
|
||||
exclude: [
|
||||
'node_modules',
|
||||
// When running for production it may be useful to exclude the other providers
|
||||
// It may be useful to exclude the other providers
|
||||
// from TS checking
|
||||
...(process.env.VERCEL
|
||||
? PROVIDERS.filter((p) => p !== name).map((p) => `framework/${p}`)
|
||||
: []),
|
||||
...EXCLUDED_PROVIDERS,
|
||||
],
|
||||
}
|
||||
|
@ -22,10 +22,16 @@
|
||||
"@components/*": ["components/*"],
|
||||
"@commerce": ["framework/commerce"],
|
||||
"@commerce/*": ["framework/commerce/*"],
|
||||
"@framework": ["framework/local"],
|
||||
"@framework/*": ["framework/local/*"]
|
||||
"@framework": ["framework/shopify"],
|
||||
"@framework/*": ["framework/shopify/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"./framework/bigcommerce",
|
||||
"./framework/swell",
|
||||
"./framework/vendure",
|
||||
"./framework/saleor"
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user