ES6 how to export all item from one file

前端 未结 2 378
醉酒成梦
醉酒成梦 2021-01-22 01:15

I want to export all methods of a file from another file.

currently I am doing this, and it works. How can I merge below two into 1 export expression

imp         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-01-22 01:38

    How can I merge below two into 1 export expression

    You cannot.

    ES2015 (and ES2016) does not provide a syntax that would allow you to import all the named exports from a file and export the object (with those as its properties) as default in a single statement.

提交回复
热议问题