Skip to content
Snippets Groups Projects
Commit 7416a87e authored by Alex Yang's avatar Alex Yang
Browse files

build: cjs file not found

parent 65b85b23
No related branches found
No related tags found
No related merge requests found
---
"llamaindex": patch
"@llamaindex/env": patch
---
build: cjs file not found
......@@ -52,7 +52,7 @@
"node": ">=18.0.0"
},
"types": "./dist/type/index.d.ts",
"main": "./dist/cjs/index.cjs",
"main": "./dist/cjs/index.js",
"exports": {
".": {
"import": {
......@@ -65,7 +65,7 @@
},
"require": {
"types": "./dist/type/index.d.ts",
"default": "./dist/cjs/index.cjs"
"default": "./dist/cjs/index.js"
}
},
"./*": {
......@@ -75,7 +75,7 @@
},
"require": {
"types": "./dist/type/*.d.ts",
"default": "./dist/cjs/*.cjs"
"default": "./dist/cjs/*.js"
}
}
},
......@@ -91,8 +91,9 @@
"lint": "eslint .",
"build": "rm -rf ./dist && pnpm run build:esm && pnpm run build:cjs && pnpm run build:type",
"build:esm": "swc src -d dist --strip-leading-paths --config-file .swcrc",
"build:cjs": "swc src -d dist/cjs --strip-leading-paths --config-file .cjs.swcrc --out-file-extension cjs",
"build:cjs": "swc src -d dist/cjs --strip-leading-paths --config-file .cjs.swcrc",
"build:type": "tsc -p tsconfig.json",
"postbuild": "node -e \"require('fs').writeFileSync('./dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }))\"",
"circular-check": "madge -c ./src/index.ts",
"dev": "concurrently \"pnpm run build:esm --watch\" \"pnpm run build:cjs --watch\" \"pnpm run build:type --watch\""
}
......
......@@ -4,7 +4,7 @@
"version": "0.0.1",
"type": "module",
"types": "dist/type/index.d.ts",
"main": "dist/cjs/index.cjs",
"main": "dist/cjs/index.js",
"exports": {
".": {
"workerd": {
......@@ -21,7 +21,7 @@
},
"require": {
"types": "./dist/type/index.d.ts",
"default": "./dist/cjs/index.cjs"
"default": "./dist/cjs/index.js"
}
},
"./*": {
......@@ -43,8 +43,9 @@
"scripts": {
"build": "rm -rf ./dist && pnpm run build:esm && pnpm run build:cjs && pnpm run build:type",
"build:esm": "swc src -d dist --strip-leading-paths --config-file .swcrc",
"build:cjs": "swc src -d dist/cjs --strip-leading-paths --config-file .cjs.swcrc --out-file-extension cjs",
"build:cjs": "swc src -d dist/cjs --strip-leading-paths --config-file .cjs.swcrc",
"build:type": "tsc -p tsconfig.json",
"postbuild": "node -e \"require('fs').writeFileSync('./dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }))\"",
"dev": "concurrently \"pnpm run build:esm --watch\" \"pnpm run build:cjs --watch\" \"pnpm run build:type --watch\""
},
"devDependencies": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment