-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[REGRESSION] Cannot assign to read only property '__esModule' of object #14890
Comments
Why are you assigning to |
I'm not - |
Can you share a self contained sample showing the issue? |
Looks like this might be an incompatibility between [email protected] and Babel. As you can see, Babel is defining I had surmised that |
Let me know if this is helpful; otherwise, I can delete it: |
What do i need to run to trigger the error? |
I just pushed a sample page to that repo. Pull the latest and run |
Looks like your loader is calling the ts compiler on a .js file ( |
Sounds like it's mostly a configuration issue, though it's bizarre that it worked and now it doesn't. Did TS2.2 make meaningful changes to |
yes. In TS 2.1 |
Summary: to workaround microsoft/TypeScript#14890 Reviewers: O2 Material Motion, #material_motion, featherless Reviewed By: O2 Material Motion, #material_motion, featherless Tags: #material_motion Differential Revision: http://codereview.cc/D2970
Summary: Working around microsoft/TypeScript#14890 by only running TS files through TypeScript Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion, featherless Reviewed By: O2 Material Motion, #material_motion, featherless Tags: #material_motion Differential Revision: http://codereview.cc/D3031
@DanielRosenwasser - you were interested in this. |
@mhegazy @DanielRosenwasser Is this something we can revert? It used to be safe to run your entire ES6 is supported in all major browsers, but developers often still publish in ES5, both out of habit and out of concern for legacy users. There are many negative ramifications:
The web development community would be in a better spot if we had a culture that allowed module authors to publish code in its original format and let application authors be concerned with translating/polyfilling for old browsers. In order to make that shift, it needs to be safe for an application author to run a transpiler on any arbitrary |
No. These changes are done in preparation for node commonjs interop.
do you have an sample package we can look at? |
I just reposted https://github.com/material-motion/tsc-reduction |
TypeScript Version: 2.2.1
Code
Note: Using
[email protected]
to do bundlingtsconfig.json
Expected behavior:
Link
is imported to the local namespace.Actual behavior:
in Chrome 56.0.2924.87. Reverting to [email protected] solves the issue.
The text was updated successfully, but these errors were encountered: