search

Home  >  Q&A  >  body text

node.js - "format cjs"; 这句话是什么意思

我 npm publish 出去的文件头部 都有这个字符串
但是我下面是用

export default 定义的 import别的文件失败

把 format cjs 去掉 就可以import

PHP中文网PHP中文网2781 days ago572

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:14:30

    should be the abbreviation of format commonjs.
    probably means that npm module should organize modules according to Commonjs, so using ES6 modules will result in undefined

    I don’t understand what the question is saying

    But I defined it below using
    export default and failed to import other files

    What does it mean

    reply
    0
  • Cancelreply