Skip to content

Commit 8c149ac

Browse files
authored
docs: correct lodash dependency usage in authoring libraries guide
## Summary Fixes misleading documentation regarding lodash dependency usage. ## Changes - Updated installation instructions to install lodash as a runtime dependency - Clarified that lodash should be listed under `dependencies` since it is used at runtime - Mentioned that bundling can be avoided using webpack externals Fixes #6896
1 parent 817551f commit 8c149ac

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/content/guides/author-libraries.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ Initialize the project with npm, then install `webpack`, `webpack-cli` and `loda
3737

3838
```bash
3939
npm init -y
40-
npm install --save-dev webpack webpack-cli lodash
40+
npm install --save-dev webpack webpack-cli
41+
npm install lodash
4142
```
4243

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.
44+
We install `lodash` as a regular dependency because it is used at runtime in our library. To avoid bundling it into the output and increasing bundle size, it can be configured as an external dependency in webpack.
4445

4546
**src/ref.json**
4647

0 commit comments

Comments
 (0)