【发布时间】:2023-01-23 09:50:43
【问题描述】:
我最近看到一个人导出了这样一个模块:
const supabase = createClient(url, key);
export { supabase };
我见过以这种方式进行导出,这是有道理的:
export default supabase; // to make supabase the default export, which we'd import without curly brackets
export supabase // to make supabase an export, which would require curly brackets on import
但什么是 export { supabase } ?
【问题讨论】: