Skip to content

Commit d1ae90a

Browse files
committed
build: remove commonjs
1 parent 91e3e30 commit d1ae90a

File tree

4 files changed

+15
-24
lines changed

4 files changed

+15
-24
lines changed

package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"name": "react-native-google-maps-plus",
33
"version": "1.2.0",
44
"description": "React-native wrapper for android & IOS google maps sdk",
5-
"main": "./lib/commonjs/index.js",
5+
"main": "./lib/module/index.js",
66
"module": "./lib/module/index.js",
77
"types": "./lib/typescript/src/index.d.ts",
88
"source": "src/index",
9+
"react-native": "src/index",
910
"scripts": {
1011
"typecheck": "tsc --noEmit",
1112
"lint": "yarn lint:js && yarn lint:android && yarn lint:ios",
@@ -148,7 +149,6 @@
148149
"source": "src",
149150
"output": "lib",
150151
"targets": [
151-
"commonjs",
152152
"module",
153153
[
154154
"typescript",
@@ -158,13 +158,5 @@
158158
]
159159
]
160160
},
161-
"exports": {
162-
".": {
163-
"source": "./src/index.tsx",
164-
"types": "./lib/typescript/src/index.d.ts",
165-
"default": "./lib/module/index.js"
166-
},
167-
"./package.json": "./package.json"
168-
},
169161
"packageManager": "[email protected]"
170162
}

src/GoogleMapsPlus.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { getHostComponent, NitroModules } from 'react-native-nitro-modules';
22

3-
import ViewConfig from '../nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json';
3+
import ViewConfig from '../nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json' with { type: 'json' };
44

55
import type {
66
RNGoogleMapsPlusViewMethods,
77
RNGoogleMapsPlusViewProps,
8-
} from './RNGoogleMapsPlusView.nitro';
8+
} from './RNGoogleMapsPlusView.nitro.js';
99

10-
import type { RNGoogleMapsPlusModule } from './RNGoogleMapsPlusModule.nitro';
10+
import type { RNGoogleMapsPlusModule } from './RNGoogleMapsPlusModule.nitro.js';
1111

1212
export const GoogleMapsView = getHostComponent<
1313
RNGoogleMapsPlusViewProps,

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { GoogleMapsView, GoogleMapsModule } from './GoogleMapsPlus';
1+
import { GoogleMapsView, GoogleMapsModule } from './GoogleMapsPlus.js';
22
import type {
33
RNGoogleMapsPlusViewMethods,
44
RNGoogleMapsPlusViewProps,
55
} from './RNGoogleMapsPlusView.nitro';
66
import type { RNGoogleMapsPlusModule } from './RNGoogleMapsPlusModule.nitro';
77

8-
export * from './types';
8+
export * from './types.js';
99

1010
export type {
1111
RNGoogleMapsPlusViewMethods,

tsconfig.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,23 @@
44
"allowUnreachableCode": false,
55
"allowUnusedLabels": false,
66
"esModuleInterop": true,
7+
"allowSyntheticDefaultImports": true,
78
"forceConsistentCasingInFileNames": true,
89
"jsx": "react",
910
"lib": ["esnext"],
1011
"module": "esnext",
11-
"moduleResolution": "node",
12+
"moduleResolution": "bundler",
13+
"target": "esnext",
14+
"verbatimModuleSyntax": true,
15+
"resolveJsonModule": true,
16+
"strict": true,
1217
"noEmit": false,
18+
"skipLibCheck": true,
1319
"noFallthroughCasesInSwitch": true,
1420
"noImplicitReturns": true,
15-
"noImplicitUseStrict": false,
16-
"noStrictGenericChecks": false,
1721
"noUncheckedIndexedAccess": true,
1822
"noUnusedLocals": true,
19-
"noUnusedParameters": true,
20-
"resolveJsonModule": true,
21-
"skipLibCheck": true,
22-
"strict": true,
23-
"target": "esnext",
24-
"verbatimModuleSyntax": true
23+
"noUnusedParameters": true
2524
},
2625
"exclude": [
2726
"**/node_modules",

0 commit comments

Comments
 (0)