Home > database >  Knowledge of object-oriented and webpack ES6
Knowledge of object-oriented and webpack ES6

Time:10-02

The benefits of Es6 object-oriented:
A unified writing;
A separate class declaration, structure function declarations,

Much Es6 object-oriented:
Class class declaration;
The constructor constructor;
Extends inheritance;
Super parent, super class,

Es6 module
Import, export, webpack compilation,

Know webpack
Able to complete all commonly used functions
Compilation of compression, packaging, a variety of documents, scaffolding, generation,

Webpack. Config. Js is a core file,

In the mode of mode determines how webpack work
There are three kinds of mode:
None is not optimized;
Output debugging information, the development process. The env. NODE_ENV
The highest production optimization, enable compression, ignore the error,

Entry: entry
Single entry: SPA
Multiple entry: MPA

Output: the output
Path: "./dest "
The path must be an absolute path,

Mode has a double meaning:
Affect the function of webpack itself, can make a webpack compression,
Can be used in ordinary js code,

Webpack default can only deal with the data of js and json,
Loader can deal with js and json data, parse things beyond js,

CSS - loader output style,
Style - loader parsing CSS styles,
Postcss - loader + autorprefixer prefixing
Less - loader compile less
File - loader url - loader is introduced into files, pictures, font
Babel - loader processing es6
  • Related