mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
It's actually working
This commit is contained in:
parent
59b8f6d78d
commit
f63a13e930
@ -10,7 +10,10 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
"./*": "./dist/*.js",
|
"./*": [
|
||||||
|
"./dist/*.js",
|
||||||
|
"./dist/*/index.js"
|
||||||
|
],
|
||||||
"./config": "./dist/config.cjs"
|
"./config": "./dist/config.cjs"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"module": "NodeNext",
|
"module": "esnext",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"baseUrl": "src",
|
"baseUrl": "src",
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
|
@ -10,14 +10,17 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
"./*": "./dist/*.js",
|
"./*": [
|
||||||
|
"./dist/*.js",
|
||||||
|
"./dist/*/index.js"
|
||||||
|
],
|
||||||
"./next.config": "./dist/next.config.cjs"
|
"./next.config": "./dist/next.config.cjs"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
"src/*",
|
"dist/*",
|
||||||
"src/*/index"
|
"dist/*/index"
|
||||||
],
|
],
|
||||||
"next.config": [
|
"next.config": [
|
||||||
"dist/next.config.d.cts"
|
"dist/next.config.d.cts"
|
||||||
@ -31,8 +34,8 @@
|
|||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
"dist/*.d.ts",
|
"src/*.d.ts",
|
||||||
"dist/*/index.d.ts"
|
"src/*/index.d.ts"
|
||||||
],
|
],
|
||||||
"next.config": [
|
"next.config": [
|
||||||
"dist/next.config.d.cts"
|
"dist/next.config.d.cts"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"module": "NodeNext",
|
"module": "esnext",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"baseUrl": "src",
|
"baseUrl": "src",
|
||||||
"lib": ["dom", "dom.iterable", "esnext"],
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
|
@ -69,9 +69,7 @@ function withCommerceConfig(nextConfig = {}) {
|
|||||||
// -> packages/[name]/dist/index.js
|
// -> packages/[name]/dist/index.js
|
||||||
const relativePath = path.relative(process.cwd(), absolutePath)
|
const relativePath = path.relative(process.cwd(), absolutePath)
|
||||||
// -> /packages/[name]/src
|
// -> /packages/[name]/src
|
||||||
const modulePath = path.join(relativePath, '../../dist')
|
const modulePath = path.join(relativePath, '../../src')
|
||||||
|
|
||||||
console.log('PATH', modulePath)
|
|
||||||
|
|
||||||
tsconfig.compilerOptions.paths['@framework'] = [`${modulePath}`]
|
tsconfig.compilerOptions.paths['@framework'] = [`${modulePath}`]
|
||||||
tsconfig.compilerOptions.paths['@framework/*'] = [`${modulePath}/*`]
|
tsconfig.compilerOptions.paths['@framework/*'] = [`${modulePath}/*`]
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
"@components/*": ["components/*"],
|
"@components/*": ["components/*"],
|
||||||
"@commerce": ["framework/commerce"],
|
"@commerce": ["framework/commerce"],
|
||||||
"@commerce/*": ["framework/commerce/*"],
|
"@commerce/*": ["framework/commerce/*"],
|
||||||
"@framework": ["../packages/local/dist"],
|
"@framework": ["../packages/local/src"],
|
||||||
"@framework/*": ["../packages/local/dist/*"]
|
"@framework/*": ["../packages/local/src/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"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