Skip to content

Commit

Permalink
Doc: Add dot-syntax documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerey committed May 17, 2022
1 parent 444c806 commit 2a96ef8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/vite-node/README.md
Expand Up @@ -27,6 +27,16 @@ Options:
npx vite-node -h
```

### ViteNodeServer options

[All `ViteNodeServer` options](https://github.com/vitest-dev/vitest/blob/main/packages/vite-node/src/types.ts#L61-L78) are supported by the CLI. They may be defined through the dot syntax, as shown below:

```bash
npx vite-node --server-options.deps.inline="module-name" --server-options.deps.external="/module-regexp/" index.ts
```

Note that for options supporting RegExps, strings passed to the CLI must start _and_ end with a `/`;

## Programmatic Usage

In Vite Node, the server and runner (client) are separated, so you can integrate them in different contexts (workers, cross-process, or remote) if needed. The demo below shows a simple example of having both (server and runner) running in the same context
Expand Down

0 comments on commit 2a96ef8

Please sign in to comment.