Skip to content

Commit

Permalink
docs: clarify external option (#3769)
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Jul 28, 2023
1 parent 9c8e308 commit b524c65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/config/index.md
Expand Up @@ -133,10 +133,13 @@ You will not be able to edit your `node_modules` code for debugging, since the c
#### deps.external

- **Type:** `(string | RegExp)[]`
- **Default:** `['**/node_modules/**']`
- **Default:** `[/\/node_modules\//]`

Externalize means that Vite will bypass the package to native Node. Externalized dependencies will not be applied Vite's transformers and resolvers, so they do not support HMR on reload. Typically, packages under `node_modules` are externalized.

When using strings they need to be paths inside your [`deps.moduleDirectories`](/config/#deps-moduledirectories). For example `external: ['module/folder']` with the default `moduleDirectories` option will externalize `node_modules/module/folder`.
Regular expressions on the other hand are matched against the whole path.

#### deps.inline

- **Type:** `(string | RegExp)[] | true`
Expand Down

0 comments on commit b524c65

Please sign in to comment.