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

Support for IE11 #20

Closed
OriR opened this issue Oct 13, 2017 · 6 comments · Fixed by #71
Closed

Support for IE11 #20

OriR opened this issue Oct 13, 2017 · 6 comments · Fixed by #71
Labels

Comments

@OriR
Copy link

OriR commented Oct 13, 2017

This addon is really awesome! Unfortunately it isn't working on IE11 😞

The cause for this (there might be more) is react-element-to-jsx-string is on version 12.0.0 and not 13.0.0
(There's a long chain of dependencies here but eventually it uses version 2.0.1 of get-own-enumerable-property-symbols which now includes an ES5 compiled version of the code).

Not sure if there are any other things that might break IE11, but after disabling just this addon storybook works as expected.

As a workaround - I can take full control over the storybook webpack config and remove the exclude from the .js rule, that excludes node_modules, that way every file will go through babel, but that's highly inefficient and might cause other issues when compiling already compiled modules.

@wcastand
Copy link
Collaborator

I publish a new version where i upgraded dependencies. let me know if that fix your issue :)

@OriR
Copy link
Author

OriR commented Oct 15, 2017

Unfortunately I missed some packages a long the way 😞
I've opened an issue for stringify-object and react-element-to-jsx-string

If it's not to much to ask, I'd like for you to publish a new version once these are resolved 😃

@wcastand
Copy link
Collaborator

One of them is already closed and the other seems not in their agenda.
Sorry but i don't think i can help you more :/
If they release a version that support browser, i'll publish a new version.

@ndelangen
Copy link
Member

Is adding https://github.com/SamVerschueren/babel-engine-plugin an option? Or should we do this over at Storybook?

@brendanmckeown
Copy link

brendanmckeown commented May 7, 2018

There is a workaround for this issue until stringify-object adds support for IE11: add a loader to compile the package with Babel.

e.g. in your webpack.config.js file (your paths might be slightly different):

  config.module.rules.push({
    test: /\.js/,
    include: path.resolve(__dirname, '../node_modules/stringify-object'),
    use: [{
      loader: 'babel-loader',
      options: {
        presets: ['env']
      }
    }]
  });

You may also need to install Babel in your project if it's not already available:

yarn add babel-loader babel-core babel-preset-env

@hipstersmoothie
Copy link
Contributor

🚀 Issue was released in v7.1.2 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants