build: fix export types (#8)

This commit is contained in:
Hugo EXTRAT 2024-09-17 19:47:13 +02:00 committed by GitHub
parent f6b2d4d1aa
commit 6f5e135d9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 47 deletions

View File

@ -4,19 +4,9 @@
"description": "In-App Rating on Android & iOS",
"source": "./src/index.tsx",
"main": "./lib/commonjs/index.js",
"react-native": "src/index.ts",
"module": "./lib/module/index.js",
"exports": {
".": {
"import": {
"types": "./lib/typescript/module/src/index.d.ts",
"default": "./lib/module/index.js"
},
"require": {
"types": "./lib/typescript/commonjs/src/index.d.ts",
"default": "./lib/commonjs/index.js"
}
}
},
"types": "lib/typescript/index.d.ts",
"files": [
"src",
"lib",
@ -49,7 +39,11 @@
"keywords": [
"react-native",
"ios",
"android"
"android",
"rate",
"review",
"native",
"store"
],
"repository": {
"type": "git",
@ -113,40 +107,18 @@
"source": "src",
"output": "lib",
"targets": [
"codegen",
[
"commonjs",
{
"esm": true
}
],
[
"module",
{
"esm": true
}
],
[
"typescript",
{
"project": "tsconfig.build.json",
"esm": true
}
]
"commonjs",
"module",
"typescript"
]
},
"codegenConfig": {
"name": "RNRateAppSpec",
"type": "all",
"type": "modules",
"jsSrcsDir": "src",
"outputDir": {
"ios": "ios/generated",
"android": "android/generated"
},
"android": {
"javaPackageName": "com.rateapp"
},
"includesGeneratedCode": true
}
},
"create-react-native-library": {
"type": "module-mixed",

View File

@ -1,17 +1,12 @@
{
"compilerOptions": {
"rootDir": ".",
"paths": {
"react-native-rate-app": ["./src/index"]
},
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react-jsx",
"lib": ["ESNext"],
"module": "ESNext",
"moduleResolution": "Bundler",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
@ -25,5 +20,6 @@
"strict": true,
"target": "ESNext",
"verbatimModuleSyntax": true
}
},
"include": ["./src/"]
}