es6 Import of three.js

后端 未结 2 1996
再見小時候
再見小時候 2021-01-04 13:36

My workflow for es6 uses babel and babel-plugin-transform-es2015-modules-system.js to only transform module import/export for use with system.js. I simply use a \"g

2条回答
  •  醉话见心
    2021-01-04 14:37

    There was a bug in the release (only one day old!). I fixed it but still had problems. I did however find that this does work:

    import * as THREE from 'etc/three.js'
    

    .. but the more obvious versions,

    import THREE from 'etc/three.js'
    or
    import 'etc/three.js'
    

    do not appear to work.

    Let me know if you grok this better than this, which is pretty random.

提交回复
热议问题