-
Notifications
You must be signed in to change notification settings - Fork 508
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
Production bundle for ES format is not enough for a development #140
Comments
I agree. ESM bundle should have NODE_ENV untouched. |
Can you send a PR? I am out of office today. Should be straight forward |
Working on it :) |
This was referenced Jun 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current Behavior
Webpack will use ES format but being in a development mode it means the wrong assumption from 3rd modules like
invariant
which then throws an error.https://github.com/zertosh/invariant/blob/fae1c859f3eec25025dc6019bf7f7fdb78a27307/invariant.js#L26
Expected behavior
Same behavior as for CJS should be used and provide development bundle along with
index.es.js
.Suggested solution(s)
Should be pretty straightforward to add a line in here...
https://github.com/palmerhq/tsdx/blob/943648edb06cd131f2c1751120cd1301804b480b/src/index.ts#L98
And utilize logic for creating index file...
https://github.com/palmerhq/tsdx/blob/943648edb06cd131f2c1751120cd1301804b480b/src/index.ts#L277
Your environment
The text was updated successfully, but these errors were encountered: