Skip to content

Conversation

@weswigham
Copy link
Member

Even when handling the exports table, as done in webpack 5. webpack 5, at least at present per this thread, doesn't handle esm/cjs interop the same way as node, so we can't use the same source as in node.

This should hopefully cause webpack to uniformly prioritize the es module sources, as it did because of the module entrypoint before we added exports.

@orta you mentioned having a webpack 5 test - care to add it to this PR?

Even when handling the `exports` table, as done in `webpack` 5. `webpack` 5, at least at present, doesn't handle esm/cjs interop the same way as `node`, so we can;t use the same source as in `node`.
@orta
Copy link
Contributor

orta commented Oct 9, 2020

Confirmed that this fixes the issue in the repro from webpack/webpack#11613 (comment)

Both:

"webpack": "./tslib.es6.js",

and

"module": "./tslib.es6.js",

Work. Gonna look into why this wasn't the case in #131

@weswigham
Copy link
Member Author

Alright, I've swapped to module - just need some tests and we can merge/backport, probably?

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

Successfully merging this pull request may close these issues.

3 participants