fix(js-sdk): bring back cjs exports
This commit is contained in:
parent
fe8f9d4b2f
commit
f6fc71b46a
File diff suppressed because it is too large
Load Diff
|
@ -4,9 +4,16 @@
|
|||
"description": "JavaScript SDK for Firecrawl API",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"default": "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsup",
|
||||
"build-and-publish": "npm run build && npm publish --access public",
|
||||
"publish-beta": "npm run build && npm publish --access public --tag beta",
|
||||
"test": "NODE_OPTIONS=--experimental-vm-modules jest --verbose src/__tests__/v1/**/*.test.ts"
|
||||
|
@ -40,6 +47,7 @@
|
|||
"@types/uuid": "^9.0.8",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.2.2",
|
||||
"tsup": "^8.2.4",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"keywords": [
|
||||
|
|
|
@ -16,17 +16,9 @@
|
|||
"noUncheckedIndexedAccess": true,
|
||||
"noImplicitOverride": true,
|
||||
|
||||
/* If transpiling with TypeScript: */
|
||||
/* If NOT transpiling with TypeScript: */
|
||||
"module": "NodeNext",
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"sourceMap": true,
|
||||
|
||||
/* AND if you're building for a library: */
|
||||
"declaration": true,
|
||||
|
||||
/* AND if you're building for a library in a monorepo: */
|
||||
"declarationMap": true /* Skip type checking all .d.ts files. */
|
||||
"noEmit": true,
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist", "**/__tests__/*"]
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
import { defineConfig } from "tsup";
|
||||
|
||||
export default defineConfig({
|
||||
entryPoints: ["src/index.ts"],
|
||||
format: ["cjs", "esm"],
|
||||
dts: true,
|
||||
outDir: "dist",
|
||||
clean: true,
|
||||
});
|
Loading…
Reference in New Issue