ES6 import {} from '..'后缀名的问题

最近在看阮一峰的ES6入门。下图中圈出来的地方不太理解。   文中说到.js后缀不可省略。 但是下文中又出现了如下写法: // lib.js export let counter = 3; export function incCounter() { counter++; } // main.js import { counter, incCounter } from './lib'; co
相关文章
相关标签/搜索