You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your ReScript project depends on the `rescript` package as a [`devDependency`](https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file), which includes our compiler, build system and runtime like `Belt`. However, you had to move it to `dependency` in `package.json` if you publish your code:
13
13
- To Docker or other low-storage deployment devices.
14
-
- For pure JS/TS consumers who probably won't install `bs-platform` in their own project.
14
+
- For pure JS/TS consumers who probably won't install `rescript` in their own project.
15
15
16
-
In these cases, the size or mere presence of `bs-platform` can be troublesome, since it includes not just our necessary runtime like `Belt`, but also our compiler and build system.
16
+
In these cases, the size or mere presence of `rescript` can be troublesome, since it includes not just our necessary runtime like `Belt`, but also our compiler and build system.
17
17
18
-
To solve that, we now publish our runtime as a standalone package at [`@rescript/std`](https://www.npmjs.com/package/@rescript/std), whose versions mirror `bs-platform`'s. Now you can keep `bs-platform` as a `devDependency` and have only `@rescript/std` as your runtime `dependency`.
18
+
To solve that, we now publish our runtime as a standalone package at [`@rescript/std`](https://www.npmjs.com/package/@rescript/std), whose versions mirror `rescript`'s. Now you can keep `rescript` as a `devDependency` and have only `@rescript/std` as your runtime `dependency`.
19
19
20
20
**This is an advanced feature**. Please only use it in the aforementioned scenarios. If you already use a JS bundler with dead code elimination, you might not need this feature.
21
21
@@ -24,8 +24,8 @@ To solve that, we now publish our runtime as a standalone package at [`@rescript
24
24
Say you want to publish a JS-only ReScript 9.0 library. Install the packages like this:
25
25
26
26
```sh
27
-
npm install bs-platform@9.0.0 --save-dev
28
-
npm install @rescript/std@9.0.0
27
+
npm install rescript@11.0.1 --save-dev
28
+
npm install @rescript/std@11.0.1
29
29
```
30
30
31
31
Then add this to `rescript.json`:
@@ -56,4 +56,4 @@ Belt_Array.forEach([1, 2, 3], function (num) {
56
56
57
57
</CodeTab>
58
58
59
-
**Make sure the version number of `bs-platform` and `@rescript/std` match in your `package.json`** to avoid running into runtime issues due to mismatching stdlib assumptions.
59
+
**Make sure the version number of `rescript` and `@rescript/std` match in your `package.json`** to avoid running into runtime issues due to mismatching stdlib assumptions.
0 commit comments