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

2.21.2 does not work in IE11 #2463

Closed
simonbrent opened this issue May 5, 2021 · 3 comments · Fixed by #2467
Closed

2.21.2 does not work in IE11 #2463

simonbrent opened this issue May 5, 2021 · 3 comments · Fixed by #2467
Assignees

Comments

@simonbrent
Copy link

When trying to use date-fns@2.21.2 in IE11, I get the following error:

Expected ':'

This error is being caused by node_modules/date-fns/esm/_lib/format/lightFormatters/index.js, which contains

var formatters = {
  // Year
  y(date, token) {
...

I think that adding @babel/plugin-transform-shorthand-properties to the plugins list in .babelrc.js might solve this issue.

@maximtop
Copy link
Contributor

maximtop commented May 6, 2021

Thank you for reporting this bug.
I've checked, indeed adding @babel/plugin-transform-shorthand-properties solves the bug.
It will be fixed when this pr #2467 merged into master.

@simonbrent
Copy link
Author

Thanks a lot!

@pjtatlow
Copy link

pjtatlow commented May 7, 2021

Any chance you guys can unpublish this broken version? Lots of organizations automatically update their node modules and will be just straight up broken in IE11.

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

Successfully merging a pull request may close this issue.

3 participants