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

Pseudo-localization on angular throws error in vendor.js in IE #8

Closed
gowthambalashanmugam opened this issue Nov 15, 2018 · 5 comments
Closed

Comments

@gowthambalashanmugam
Copy link

Since pseudo-localization npm developed in es6, it throws error in IE because vendor.js directly appended all the npm modules.

IE 11 doesn't support arrow functions as of now

@tryggvigy
Copy link
Owner

Hey @gowthambalashanmugam!
Thanks for the issue. Can you explain to me how you are using pseudo-localization a bit? I'd love to know. I'm assuming that the library should only be included during development which usually happens on very recent browsers. Of course it makes sense to look at a website in development mode in IE11 sometimes, like when debugging a IE11 bug. Is that the use-case you have for having pseudo-localization work in IE11? I think we should support IE11 but I want to understand how it's being used a bit! I'll take a closer look asap.

@gowthambalashanmugam
Copy link
Author

Hello @tryggvigy. Am using pseudo-localization in angular 6 project.
imported module by " import { localize } from 'pseudo-localization' "

So when deploying build, the vendor.js will be created by merging all node module files as it is. So if the module developed on es6, instead of transpile to es5, the vendor file just clubbing npm, so on load in IE it throws error and angular is not bootstrapping. Please let me know for more inputs.

@tryggvigy
Copy link
Owner

I'm missing some context but wouldn't you want to exclude pseudo-localization dependency when deploying to production?

Are you using webpack?
Can you conditionally include it in your bundle depending on the NODE_ENV environment variable?
Thats quite a common way to for example exclude debug logging from the production bundle.

@gowthambalashanmugam
Copy link
Author

Hello @tryggvigy. am using angular-cli (ng 6). not pure web-pack. am suggesting you to implement pseudo-localization in any angular project and check in IE11.

By the wat i want to exclude pseudo-localization in prod

@tryggvigy
Copy link
Owner

@gowthambalashanmugam This issue was fixed in #16! Try to install the latest version and see if you issue is fixed. I'm closing the issue now assuming that it's fixed since we now transpile arrow functions and more

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