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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on IE11 in case use xstyled 2.3.0 and later #247

Closed
strozw opened this issue Apr 26, 2021 · 3 comments 路 Fixed by #248
Closed

Not working on IE11 in case use xstyled 2.3.0 and later #247

strozw opened this issue Apr 26, 2021 · 3 comments 路 Fixed by #248

Comments

@strozw
Copy link
Contributor

strozw commented Apr 26, 2021

馃悰 Bug Report

IE11 & core-js is not support RegExp dotAll flag.

So IE11 throw Error: TypeError: Syntax error in regular expression in xstyled 2.3.0 and later.

Probably need to fix the following code to resolve this issue.
https://github.com/gregberge/xstyled/blob/main/packages/core/src/transform.ts#L32

For example, stop using the dotall flag and use [\s\S] instead of ..
https://stackoverflow.com/questions/1068280/javascript-regex-multiline-flag-doesnt-work

To Reproduce

To transpile application by babel 7 & core-js 3, that using xstyled 2.3.0 and later. and exec on IE11.

Expected behavior

Woking on IE11

Link to repl or repo (highly encouraged)

Sorry, I'm not ready yet.

Run npx envinfo --system --binaries --npmPackages @xstyled/system,@xstyled/styled-components,styled-components --markdown --clipboard

## System:
 - OS: macOS 11.2.3
 - CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
 - Memory: 15.57 GB / 64.00 GB
 - Shell: 5.8 - /usr/local/bin/zsh
## Binaries:
 - Node: 14.15.4 - ~/.asdf/installs/nodejs/14.15.4/bin/node
 - Yarn: 1.22.10 - /usr/local/bin/yarn
 - npm: 6.14.10 - ~/.asdf/installs/nodejs/14.15.4/bin/npm
 - Watchman: 4.9.0 - /usr/local/bin/watchman
## npmPackages:
 - @xstyled/styled-components: 2.4.1 => 2.4.1
 - styled-components: 5.2.3 => 5.2.3
@agriffis
Copy link
Collaborator

Thanks!

@agriffis
Copy link
Collaborator

agriffis commented Apr 26, 2021

@gregberge I put the fix for this on main and next. Do you want to make a v2 release?

@agriffis agriffis reopened this Apr 26, 2021
@gregberge
Copy link
Collaborator

Fixed in v2.5

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