Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions docs/config/ssr-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ If `true`, all dependencies including linked dependencies are externalized.

Note that the explicitly listed dependencies (using `string[]` type) will always take priority if they're also listed in `ssr.noExternal` (using any type).

When using the Environment API, configure the same behavior with
`environments.<name>.resolve.external`. `ssr.external` is the backward-compatible alias for
the default `ssr` environment.

## ssr.noExternal

- **Type:** `string | RegExp | (string | RegExp)[] | true`
Expand All @@ -24,6 +28,10 @@ If `true`, no dependencies are externalized. However, dependencies explicitly li

Note that if both `ssr.noExternal: true` and `ssr.external: true` are configured, `ssr.noExternal` takes priority and no dependencies are externalized.

When using the Environment API, configure the same behavior with
`environments.<name>.resolve.noExternal`. `ssr.noExternal` is the backward-compatible alias
for the default `ssr` environment.

## ssr.target

- **Type:** `'node' | 'webworker'`
Expand Down
5 changes: 5 additions & 0 deletions docs/guide/api-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ interface UserConfig extends EnvironmentOptions {
}
```

For server environments, dependency externalization is configured under `resolve`, not `build`.
Use `environments.<name>.resolve.noExternal` and `environments.<name>.resolve.external`
for custom environments. The top-level `ssr.noExternal` and `ssr.external` options are the
backward-compatible aliases for the default `ssr` environment.

Note that the `ssr` top-level property is going to be deprecated once the Environment API is stable. This option has the same role as `environments`, but for the default `ssr` environment and only allowed configuring of a small set of options.

## Custom Environment Instances
Expand Down