JavaScript 中 require, import 的差別及效能

Nic Lin at 
簡單說差別:import 是編譯中執行,CommonJS 的 require 是同步加載 import 無論在 node 或是瀏覽器都不能直接使用,透過 Babel 轉譯後還是使用 CommonJS 加載,所以兩者……