Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browser throw error when import Chimee with esm file #142

Closed
lizheming opened this issue Aug 6, 2018 · 6 comments
Closed

browser throw error when import Chimee with esm file #142

lizheming opened this issue Aug 6, 2018 · 6 comments
Assignees

Comments

@lizheming
Copy link

使用 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
Copy link
Member

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

@lizheming
Copy link
Author

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

@toxic-johann
Copy link
Member

嗯嗯

@lizheming
Copy link
Author

但是 Chimee 并不支持 node 端吧?

@toxic-johann
Copy link
Member

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

@lizheming
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants