File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 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 )  
22
33This is a [ webpack] ( https://webpack.js.org/ )  4 demo project.
44
55## Install webpack  
66
77``` bash 
8+ #  add webpack 4 (currently on 4.0.0-beta.2)
89yarn add webpack@next webpack-cli --dev
910``` 
1011
@@ -22,9 +23,27 @@ On Webpack 4 they has defaults values:
2223
2324### Mode  
2425
26+ Webpack mode reduce the required configuration for a useful build:
27+ 
2528*  ` 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)
2730
2831``` bash 
2932webpack --mode production
3033``` 
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