It's actually working

This commit is contained in:
LFades 2022-01-12 01:11:03 -05:00
parent 59b8f6d78d
commit f63a13e930
6 changed files with 17 additions and 13 deletions

View File

@ -10,7 +10,10 @@
"type": "module",
"exports": {
".": "./dist/index.js",
"./*": "./dist/*.js",
"./*": [
"./dist/*.js",
"./dist/*/index.js"
],
"./config": "./dist/config.cjs"
},
"typesVersions": {

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "esnext",
"module": "NodeNext",
"module": "esnext",
"outDir": "dist",
"baseUrl": "src",
"lib": ["dom", "dom.iterable", "esnext"],

View File

@ -10,14 +10,17 @@
"type": "module",
"exports": {
".": "./dist/index.js",
"./*": "./dist/*.js",
"./*": [
"./dist/*.js",
"./dist/*/index.js"
],
"./next.config": "./dist/next.config.cjs"
},
"typesVersions": {
"*": {
"*": [
"src/*",
"src/*/index"
"dist/*",
"dist/*/index"
],
"next.config": [
"dist/next.config.d.cts"
@ -31,8 +34,8 @@
"typesVersions": {
"*": {
"*": [
"dist/*.d.ts",
"dist/*/index.d.ts"
"src/*.d.ts",
"src/*/index.d.ts"
],
"next.config": [
"dist/next.config.d.cts"

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "esnext",
"module": "NodeNext",
"module": "esnext",
"outDir": "dist",
"baseUrl": "src",
"lib": ["dom", "dom.iterable", "esnext"],

View File

@ -69,9 +69,7 @@ function withCommerceConfig(nextConfig = {}) {
// -> packages/[name]/dist/index.js
const relativePath = path.relative(process.cwd(), absolutePath)
// -> /packages/[name]/src
const modulePath = path.join(relativePath, '../../dist')
console.log('PATH', modulePath)
const modulePath = path.join(relativePath, '../../src')
tsconfig.compilerOptions.paths['@framework'] = [`${modulePath}`]
tsconfig.compilerOptions.paths['@framework/*'] = [`${modulePath}/*`]

View File

@ -23,8 +23,8 @@
"@components/*": ["components/*"],
"@commerce": ["framework/commerce"],
"@commerce/*": ["framework/commerce/*"],
"@framework": ["../packages/local/dist"],
"@framework/*": ["../packages/local/dist/*"]
"@framework": ["../packages/local/src"],
"@framework/*": ["../packages/local/src/*"]
}
},
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],