You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/yarn.md
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Yarn
2
2
3
-
Webpacker by default uses `yarn` as package manager for node modules
3
+
Webpacker by default uses `yarn` as a package manager for `node_modules`
4
4
5
5
6
6
## Add a new npm module
@@ -10,3 +10,14 @@ To add any new JS module you can use `yarn`:
10
10
```bash
11
11
yarn add bootstrap material-ui
12
12
```
13
+
14
+
## Add an npm module to `devDependencies`
15
+
To add a new JS module that will only be available to local development:
16
+
17
+
```bash
18
+
yarn add --dev browser-sync
19
+
```
20
+
21
+
Be careful not to add any build or app related JS modules in this fashion. Adding JS modules to `devDependencies`[will block them from being installed in **any** production environment](https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-production-true-false).
22
+
23
+
Docs from JS modules may instruct you to use `--dev` or `devDependencies`, but this is generally under the assumption that you are using a `node.js` workflow.
0 commit comments