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

storybook 6.1.10 + ie11 isn't working = highlightjs isnt babel'd #38

Closed
dutscher opened this issue Jan 12, 2021 · 3 comments
Closed

storybook 6.1.10 + ie11 isn't working = highlightjs isnt babel'd #38

dutscher opened this issue Jan 12, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@dutscher
Copy link

using the newest: "@whitespace/storybook-addon-html": "^4.2.0",
and default storybook babel and webpack config.

And here the main.js addon config:
image

This combi will break the IE11:
image
image
class Response isn't ready for es5

here a chrome console output:
image

and then i found that highlight.js. this file isn't babel'd yet node_modules/highlight.js/lib/core.js which is required by "react-syntax-highlighter": "^15.4.3".
but your https://github.com/whitespace-se/storybook-addon-html/blob/master/addon/.babelrc has exactly the plugin-proposal-class-properties.

what can i do to fix this issue?
thanks in advance.

cheers

@jeanfredrik jeanfredrik added the bug Something isn't working label Jan 14, 2021
@jeanfredrik jeanfredrik self-assigned this Jan 14, 2021
@dutscher
Copy link
Author

dutscher commented Feb 9, 2021

its releated to highlightjs/highlight.js#2501 they dropped ie11 support in v10.
maybe there is no hope to get this working :)

cheers

@jeanfredrik
Copy link
Member

One option would be to downgrade react-syntax-highlighter from 15 to 13. That shouldn’t be problem though because this addon doesn’t rely on any of the features listed as breaking changes in neither Highlight.js or [react-syntax-highlighter]((https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/CHANGELOG.MD).

Right now I can’t get the latest version of Storybook (6.2.9) to work in IE11 at all though because of this issue. When it's solved, we can give this a try.

@jeanfredrik
Copy link
Member

From version 5 of this addon react-syntax-highlighter is a peer dependency that you install manually, so downgrading would be easy. I'm not sure if IE11 is still a requirement for you though. I will close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants