Skip to content

Commit f531d02

Browse files
authored
Update lodash dependency explanation in author-libraries guides
Clarify the usage of lodash as a dependency and explain the implications of using devDependencies for runtime dependencies.
1 parent 046a2b1 commit f531d02

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/content/guides/author-libraries.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ npm init -y
4040
npm install --save-dev webpack webpack-cli lodash
4141
```
4242

43-
We install `lodash` as `devDependencies` instead of `dependencies` because we don't want to bundle it into our library, or our library could be easily bloated.
43+
We install lodash as a dependency because it is directly used in the library code.
44+
45+
If you want to avoid bundling it, you should configure it as an external dependency in webpack instead of incorrectly placing it in devDependencies.
46+
Using devDependencies for runtime dependencies can lead to missing modules in production environments.
4447

4548
**src/ref.json**
4649

0 commit comments

Comments
 (0)