Is ES6 `export class A` equivalent to `module.exports = A`?

前端 未结 3 1148
终归单人心
终归单人心 2020-12-28 16:42

When I see the compiled code by Babel, they do not seem to be equivalent. Actually, the former transforms to exports.A = A, which is not equivalent to mod

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-28 17:13

    babel6 is not supported export default A to modules.export=A

    you should add a plugin

提交回复
热议问题