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

docx is not being transpiled correctly in IE11 #240

Closed
alperunal opened this issue Jan 10, 2019 · 11 comments
Closed

docx is not being transpiled correctly in IE11 #240

alperunal opened this issue Jan 10, 2019 · 11 comments
Labels

Comments

@alperunal
Copy link

Hello,

I use docx in my Angular 7 application. It works well on Chrome, Firefox, Safari and Edge. However, i get syntax error on ie11.

docx-bug

Target is ES5 in my tsconfig file. Other 3rd party libraries are correctly being transpiled.

@dolanmiu dolanmiu changed the title docx is not being transpiled correctly docx is not being transpiled correctly in IE11 Jan 10, 2019
@dolanmiu
Copy link
Owner

I have never tested this library on internet explorer before

Good to know

@dolanmiu dolanmiu added the bug label Jan 10, 2019
@dolanmiu
Copy link
Owner

dolanmiu commented Jan 10, 2019

Can you tell me what front-end framework you are using? Angular?

Target in docx is es6:

https://github.com/dolanmiu/docx/blob/master/tsconfig.json#L3

@alperunal
Copy link
Author

Yes, I use Angular 7.

I set target to es5 also needed to add
"lib": [ "es2015", "dom" ]
to build docx for es5.

@ghost
Copy link

ghost commented Feb 5, 2019

Seeing exact error in an ember application. ember-cli uses babel for transpiling.

@msv-phulatt
Copy link

I'm also experiencing this issue, is there a workaround for getting it working in IE11?

@dolanmiu
Copy link
Owner

There is a PR which solves this issue, but it is failing some tests

#241

@dolanmiu dolanmiu mentioned this issue Aug 8, 2019
@XGhozt
Copy link

XGhozt commented Aug 21, 2019

Same issue here.

@DakotaWray2
Copy link

Any follow up on why the test fails?
Would love to be able to use this with IE

@chetanraskar
Copy link

Any progress on this ,I am facing this for Vue. Although I could transpile library. I am getting below error
"export 'Paragraph' was not found in 'docx'

@XGhozt
Copy link

XGhozt commented Mar 17, 2020

I thought maybe I should share this... I have it working but, the tests fail. From what I can tell it works fine though (both in ie11 and non-ie11). https://github.com/XGhozt/docx

@dolanmiu
Copy link
Owner

I won't be doing this feature as the solution is to change the target from es6 to es5, which significantly increases the size of the bundle (300kb to 1.3mb, that's a 400% increase).

I am not sure if it is worth it. Microsoft will drop support of IE completely in 2021, so I don't think developers should support it either.

If people want IE11 support, then im afraid they need to build their own one.

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

No branches or pull requests

6 participants