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

__esModule property missing when dynamic module is concatenated #8666

Closed
Bobgy opened this issue Jan 22, 2019 · 3 comments
Closed

__esModule property missing when dynamic module is concatenated #8666

Bobgy opened this issue Jan 22, 2019 · 3 comments

Comments

@Bobgy
Copy link

Bobgy commented Jan 22, 2019

Bug report

What is the current behavior?
Some libraries depend on an exported module to have __esModule === true for understanding the export is an es module.

However, module concatenation doesn't work with this behavior that it doesn't have the __esModule property.

If the current behavior is a bug, please provide the steps to reproduce.
see the repo: https://github.com/Bobgy/webpack-concat-esmodule-bug-reproduction

What is the expected behavior?

regardless of a module is concatenated or not, it should have module.exports.__esModule === true

Other relevant information:
webpack version: 4.29.0
Node.js version: 8.12
Operating System: Ubuntu 18.04
Additional tools:

@Bobgy
Copy link
Author

Bobgy commented Jan 22, 2019

I'm not fully sure if this behavior is intended or not. Just tested this and it seems the behavior is the same from webpack 4.0

@sokra
Copy link
Member

sokra commented Jan 22, 2019

Yep, seem to be a bug..

@Bobgy
Copy link
Author

Bobgy commented Jan 23, 2019

Awesome, thank you for the quick fix!

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

No branches or pull requests

2 participants