Skip to content

Commit 67d7fa2

Browse files
torifatEugeneHlushko
authored andcommitted
docs(guides) update tree shaking guide (#2627)
1 parent 52579aa commit 67d7fa2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/content/guides/tree-shaking.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ contributors:
1414
- byzyk
1515
- pnevares
1616
- EugeneHlushko
17+
- torifat
1718
related:
1819
- title: "webpack 4 beta — try it today!"
1920
url: https://medium.com/webpack/webpack-4-beta-try-it-today-6b1d27d7d7e2#9a67
@@ -75,7 +76,10 @@ module.exports = {
7576
path: path.resolve(__dirname, 'dist')
7677
- }
7778
+ },
78-
+ mode: 'development'
79+
+ mode: 'development',
80+
+ optimization: {
81+
+ usedExports: true
82+
+ }
7983
};
8084
```
8185

@@ -186,7 +190,10 @@ module.exports = {
186190
filename: 'bundle.js',
187191
path: path.resolve(__dirname, 'dist')
188192
},
189-
- mode: 'development'
193+
- mode: 'development',
194+
- optimization: {
195+
- usedExports: true
196+
- }
190197
+ mode: 'production'
191198
};
192199
```

0 commit comments

Comments
 (0)