bhauman / bhauman/react-native-figwheel-bridge
cljsExports with dots
- Dominant language
- JavaScript
- Stars
- 80
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
How should I write a cljsExports line for a react-native package that contains a "/"?
For example, I'd like to use the library `'@react-native-community/art'` and require it from clojurescript with:
```
(ns my-rn-app
(:require [react-native-community.art :as art]))
```
I tried editing index.js to add:
```
cljsExports['react-native-community.art'] = require('@react-native-community/art');
```
and:
```
cljsExports['react-native-community'] = {};
cljsExports['react-native-community']['art'] = require('@react-native-community/art');
```
But neither of these seemed to work.
What do I need to add to `cljsExports` to get this to work?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with index.js and the existing cljsExports entries, then trace how the React Native bridge resolves names containing dots and slashes. Reproduce the @react-native-community/art require with the shown namespace and verify that the resulting ClojureScript import works without manual edits outside the expected export configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, javascript, react-native
- Domain
- mobile, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100