Skip to content

Commit

Permalink
implemented fix for js prjects
Browse files Browse the repository at this point in the history
  • Loading branch information
KennyHuRadar committed Mar 25, 2024
1 parent cf4a8f9 commit f227b7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { RadarNativeInterface } from "./@types/RadarNativeInterface";
import {Platform} from "react-native";

let module: RadarNativeInterface;

module = require("./index.native").default;

export default module;

export { default as RadarRNWeb } from "./index.web";
let RadarRNWeb = Platform.OS === 'web'? require("./index.web").default: {};

export { RadarRNWeb };

export { default as Autocomplete } from "./ui/autocomplete";
export { default as Map } from "./ui/map";

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"noImplicitAny": false,
},
"include": [
"src/index.ts"
"src/index.ts",
"src/index.web.js"
],
"exclude": [
"node_modules",
Expand Down

0 comments on commit f227b7f

Please sign in to comment.