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

代码中混合使用了es6的import和commonjs的module.exports #506

Closed
kingback opened this issue Jul 20, 2018 · 1 comment
Closed

代码中混合使用了es6的import和commonjs的module.exports #506

kingback opened this issue Jul 20, 2018 · 1 comment
Labels
NeedPR You can commit a PR to help us.

Comments

@kingback
Copy link
Contributor

RT,如:https://github.com/alibaba/rax/blob/master/packages/universal-panresponder/src/index.js#L435

这种代码风格在

{
  loader: 'babel-loader',
  presets: [
    ['env', { modules: false }]
  ]
}

下会导致报错,官方也不推荐这两种风格混合使用,相关issue:

almende/vis#2934
webpack/webpack#4039 (comment)
webpack/webpack#3491
https://stackoverflow.com/questions/42449999/webpack-import-module-exports-in-the-same-module-caused-error

@wssgcg1213
Copy link
Collaborator

抱歉带来困扰,确实不应该混用 ESM/CommonJS 两种模块导出规范。

如果方便的话可以提交 PR 帮助我们修复这些问题

@wssgcg1213 wssgcg1213 added the NeedPR You can commit a PR to help us. label Feb 26, 2019
@yuanyan yuanyan closed this as completed Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedPR You can commit a PR to help us.
Projects
None yet
Development

No branches or pull requests

3 participants