Project structure
For a practical example of the below structure, check out our example project.
Here is how a Mitosis project will be structured:
src/
contains your Mitosis source codeoutput/
contains per-target output of the project- You will notice
.lite.tsx
files in your output. Those are a human-readable Mitosis components. Think of them as a reference point for you to debug more easily, since the actual JS output is minified and thus difficult to read.
- You will notice
mitosis.config.js
contains general and per-target configuration. It is used bymitosis build
.overrides/
contains a per-target folder that mimicks the structure ofsrc
, and will completely swap out any files with identical names.- Example: if we have defined
overrides/react-native/src/functions/is-react-native.ts
, it will overridesrc/functions/is-react-native.ts
inoutput/react-native/src/functions/is-react-native.js
.
- Example: if we have defined