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

Distributed code contains arrow function that breaks apps on IE11 #18

Closed
ArthurClemens opened this issue Jul 9, 2019 · 5 comments
Closed

Comments

@ArthurClemens
Copy link

Our app suddenly broke after updating from 1.0.5 to 2.0.0. Since transpilation normally does not happen on code in node_modules, this library was included as-is. Please include a es5 compatible version.

@sindresorhus
Copy link
Owner

This module mainly targets Node.js, not the browser. It's up to you to transpile it with Babel if you want to use it in the browser. You can find a more detailed explanation here: sindresorhus/ama#446

If you use Webpack, check out babel-engine-plugin, which transpiles only the dependencies that needs to be transpiled.

If you use Create React App, upgrade to Create React App v2. It supports automatic transpilation of dependencies, which will make this package just work.

@TheHolyWaffle
Copy link

I'd argue to re-open this. It's industry standard when it comes to frontend development that npm modules are already babelyfied when published. Because, normally people use babel-loader in combination with webpack but exclude node_modules from transpilation.

@charmander charmander mentioned this issue Nov 20, 2019
@wsmarsh
Copy link

wsmarsh commented Nov 20, 2019

I was using Vue-CLI with this package and it still broke IE11 - your answer to this issue is quite lazy

@charmander
Copy link
Contributor

@wsmarsh transpileDependencies

@wsmarsh
Copy link

wsmarsh commented Nov 20, 2019

Please add to the ReadMe that it only works for NodeJS and not the Browser

LMS007 pushed a commit to hypothesis/client that referenced this issue Apr 16, 2020
This broke IE 11. See issue sindresorhus/escape-string-regexp#18

Signed-off-by: Kyle Keating <kkeating@hypothes.is>
LMS007 pushed a commit to hypothesis/client that referenced this issue Apr 16, 2020
This broke IE 11. See issue sindresorhus/escape-string-regexp#18

Signed-off-by: Kyle Keating <kkeating@hypothes.is>
LMS007 added a commit to hypothesis/client that referenced this issue Apr 20, 2020
* Revert escape-string-regexp  back to 1.0.5

This broke IE 11. See issue sindresorhus/escape-string-regexp#18

Signed-off-by: Kyle Keating <kkeating@hypothes.is>

* Fix es2018 polyfill so it does not break IE11

Promise is undefined in IE11.

Signed-off-by: Kyle Keating <kkeating@hypothes.is>

* Add user-agent shared util

Adds 2 helper methods:
- isIE11
- isMacOS

Signed-off-by: Kyle Keating <kkeating@hypothes.is>

* Fix IE11 keyboard events

- IE11 uses special names for arrow keys that are different than the standard key names.
- Fix handleOnInput in tag-editor for IE11
- use isMacOS in markdown-editor

* Add renderer-options.js module

This module holds any renderer options to globally fix browser quirks or any other unique customizations we wish to add.

The dir=“auto” causes an exception in IE11. ie11DomReassignments() will simply replace that attribute’s value with an empty value so it does not break.

* Add browser-compatiblity-utils module

Current only holds one method used to translate key names used by IE11 to standardized names that all components can assume. This removes the need for special cases in each component when listening to keyboard events.

* missing code cov
Repository owner locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants