webpack4-02 concept

What 1.webpack that?

Module Packaging Tool

2. Support for multiple syntax specification

ES module wording:

Export:

//a.js
function App () { console.log('hello world') } export default App;

 

Import:

The index.js // 

Import from the App './a.js'; 

// business logic

  

CommonJs specification

Export:

//a.js
function App () {
     console.log('hello world')
}

module.export=App;  

 

Import:

The index.js // 

var = the App the require ( './ a.js'); 

// business logic

  

 

 

 

 

 

 

 

 

 

  

Guess you like

Origin www.cnblogs.com/ipoodle/p/11442811.html