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

docs: explain dep handling in dev and build #7187

Merged
merged 2 commits into from
Mar 6, 2022
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion docs/guide/dep-pre-bundling.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ This is Vite performing what we call "dependency pre-bundling". This process ser

By pre-bundling `lodash-es` into a single module, we now only need one HTTP request instead!

Note that this only applies in development mode.
::: tip NOTE
Dependency pre-bundling only applies in development mode, and uses `esbuild` to convert dependencies to ESM. In production builds, `@rollup/plugin-commonjs` is used instead. This is safe in most cases, but may cause small inconsistencies for some dependencies.
bluwy marked this conversation as resolved.
Show resolved Hide resolved
:::

## Automatic Dependency Discovery

Expand Down