File tree 1 file changed +21
-2
lines changed 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 1
- # webpack-demo
1
+ # Webpack-Demo & middot ; [ ![ GitHub license ] ( https://img.shields.io/github/license/carloluis/ webpack-demo.svg )] ( https://github.com/carloluis/webpack-demo/blob/master/LICENSE )
2
2
3
3
This is a [ webpack] ( https://webpack.js.org/ ) 4 demo project.
4
4
5
5
## Install webpack
6
6
7
7
``` bash
8
+ # add webpack 4 (currently on 4.0.0-beta.2)
8
9
yarn add webpack@next webpack-cli --dev
9
10
```
10
11
@@ -22,9 +23,27 @@ On Webpack 4 they has defaults values:
22
23
23
24
### Mode
24
25
26
+ Webpack mode reduce the required configuration for a useful build:
27
+
25
28
* ` production ` : enables optimizations out of the box (scope hoisting, tree shaking, minification, etc.)
26
- * ` development ` : this mode is optimized for speed (un-minified bundle)
29
+ * ` development ` : this mode provide useful error messages and is optimized for speed (un-minified bundle)
27
30
28
31
``` bash
29
32
webpack --mode production
30
33
```
34
+
35
+ ## Webpack Changes
36
+
37
+ Full list of changes on [ webpack changelog] ( https://github.com/webpack/webpack/releases ) .
38
+
39
+ - Webpack dropped _ Node.js 4_ support. Therefore, more benefits from ES6 features (optimizations from V8).
40
+ - Sets of defaults with ** production** and ** development** modes.
41
+ - General defaults (zero config file).
42
+
43
+ More changes on [ v4.0.0-beta.0] ( https://github.com/webpack/webpack/releases/tag/v4.0.0-beta.0 )
44
+
45
+ ## Articles
46
+
47
+ - [ :rocket : webpack 4 beta — try it today! :rocket : ] ( https://medium.com/webpack/webpack-4-beta-try-it-today-6b1d27d7d7e2 )
48
+ - [ webpack 4: mode and optimization] ( https://medium.com/webpack/webpack-4-mode-and-optimization-5423a6bc597a )
49
+ - [ webpack 4: import() and CommonJs] ( https://medium.com/webpack/webpack-4-import-and-commonjs-d619d626b655 )
You can’t perform that action at this time.
0 commit comments