Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document relativeRuntime #2091

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/plugin-transform-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ This allows users to run `transform-runtime` broadly across a whole project. By

Using absolute paths is not desirable if files are compiled for use at a later time, but in contexts where a file is compiled and then immediately consumed, they can be quite helpful.

### `relativeRuntime`

`boolean` or `string`, defaults to `false`.

Similar to `absoluteRuntime`, but the generated path will be the relative difference between the resolved runtime and the location of the transpiled file. Using this option makes it portable across systems, although it also makes the setup slightly harder as you need to ensure that the relative location of the runtime compared to your sources is the same as the transpiled files.

> You can read more about configuring plugin options [here](https://babeljs.io/docs/en/plugins#plugin-options)

## Technical details
Expand Down