A package written in CommonJS specification, you can use it directly
import connect from 'connect'
Such a syntax introduction is implemented by ES6 Module or only implemented by Babel during translation
滿天的星座2017-07-05 10:43:50
CommonJs modules must comply with the Commonjs specification, which is similar to the ES6 syntax, but is not equivalent to the ES6 specification.
import connect from 'connect' This is written in ES6 syntax. Currently, many browsers do not support ES6 syntax, so a converter is needed, such as Babel, which can convert ES6 syntax statements into ES5 and other syntax statements.