为file1说我有
import * as Things1 from "../things1"
import * as Things2 from "../things2"
export {
Things1,
Things2,
}对于file2,我有
import * as Distributor from "../file1"
import * as Things3 from "../../things3"我如何导出它,使它看起来像
export {
Things1,
Things2,
Things3,
}在file2中
我不想用
export const Things1 = Distributor.Things1;因为在我的实际文件中导出了很多变量
发布于 2022-11-09 04:31:38
您可以像这样直接导出所有东西:
export * from "../file1"; // export everything from file1
export { Things3 } from "../../thing3"; // selectively export only Things3https://stackoverflow.com/questions/74369373
复制相似问题