File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ npm init -y
21
21
npm install --save-dev webpack@beta
22
22
./node_modules/.bin/webpack --help # Shows a list of valid cli commands
23
23
.\n ode_modules\. bin\w ebpack --help # For windows users
24
- npm install --save lodash
25
24
```
26
25
27
26
Now create a subdirectory ` app ` with an ` index.js ` file.
@@ -65,7 +64,13 @@ There are problems with managing JavaScript projects this way:
65
64
- If a dependency is missing, or is included in the wrong order, the application will not function at all.
66
65
- If a dependency is included but is not used, then there is a lot of unnecessary code that the browser has to download.
67
66
68
- To bundle the ` lodash ` dependency with ` index.js ` , we need to import ` lodash ` from ` index.js ` .
67
+ To bundle the ` lodash ` dependency with ` index.js ` , we need to first install ` lodash `
68
+
69
+ ```
70
+ npm install --save lodash
71
+ ```
72
+
73
+ and then import it.
69
74
70
75
__ app/index.js__
71
76
You can’t perform that action at this time.
0 commit comments