Skip to content

Commit ebdc061

Browse files
Merge pull request #721 from fhammerschmidt/build-configuration-sources-public
Document 'public' feature
2 parents 9a08b34 + a19ec1a commit ebdc061

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pages/docs/manual/latest/build-configuration.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ You can mark your directories as dev-only (for e.g. tests). These won't be built
6666
}
6767
```
6868

69+
You can also explicitly allow which modules can be seen from outside. This feature is especially useful for library authors who want to have a single entry point for their users.
70+
Here, the file `src/MyMainModule.res` is exposed to outside consumers, while all other files are private.
71+
72+
```json
73+
{
74+
"sources": {
75+
"dir": "src",
76+
"public": ["MyMainModule"]
77+
},
78+
}
79+
```
80+
6981
## bs-dependencies, bs-dev-dependencies
7082

7183
List of ReScript dependencies. Just like `package.json`'s dependencies, they'll be searched in `node_modules`.

0 commit comments

Comments
 (0)