Chimeejs / chimee

a video player framework aims to bring wonderful experience on browser
http://chimee.pyzy.net/
MIT License
2.4k stars 201 forks source link

browser throw error when import Chimee with esm file #142

Closed lizheming closed 6 years ago

lizheming commented 6 years ago

使用 ES Module 方式引入 Chimee 编译的 esm 包报错。 Browser throw error when we import Chimee esm build file with es module type.

Expected Behavior【期望行为】

Import normal.

Current Behavior【实际表现】

image

Uncaught TypeError: Failed to resolve module specifier "babel-runtime/helpers/typeof". Relative references must start with either "/", "./", or "../".

Steps to Reproduce【复现方法】

demo page: https://imnerd.org/lab/chimee/

toxic-johann commented 6 years ago

使用 index.esm.js 即可解决问题。详见https://github.com/Chimeejs/chimee/tree/master/demo/esm-import

lizheming commented 6 years ago

那 index.mjs 是用来做什么的呢? for node ?

toxic-johann commented 6 years ago

嗯嗯

lizheming commented 6 years ago

但是 Chimee 并不支持 node 端吧?

toxic-johann commented 6 years ago

主要用于 webpack/rollup 二次编译。

lizheming commented 6 years ago

如果是这样的话是否有必要把它上传到仓库中来维护呢?