Loading babel-polyfill for IE11
See original GitHub issueI have my first component working in Storybook, and everything is fine on Chrome and Firefox, but in IE11, I get the error Object doesn't support property or method 'find'
when Storybook is trying to find a story in an array.
This seems to be because Array.find()
needs to be polyfilled.
The solution should be to add import 'babel-polyfill;
to the entrypoint, but I can’t seem to find the right place to put this with Storybook (i.e., what constitutes the “entrypoint”).
I’ve tried adding it to my component’s index.js
, as well as at the top of each of my story files, and also in .storybook/config.js
, but I still get the same error in IE11. I also tried adding module.entry=['babel-polyfill']
in the webpack.config.js
, with no difference.
Any other suggestions?
I’m using start-storybook -p 9001 -s ./stories
rather than a custom server.js
if that matters.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:16
- Comments:38 (20 by maintainers)
Top GitHub Comments
I downloaded the repo and used
npm link
to connect it to my project.If I add
import 'babel-polyfill';
as the first line of/src/client/manager/index.js
, then everything loads properly in IE11.It also works if I instead change the
/src/client/manager/webpack.manager.conf.js
to have the following entry points:Can anyone else confirm if Storybook works for them in IE11 without one of these changes?
Also, for some reason, I needed to
npm install babel-plugin-stage-0 --save-dev
and rerunnpm run prepublish
in@kadira/react-storybook
in order for my own app build to succeed. Without it, I got this error in my own app’s build:Not sure if this is just because my project is using
stage-0
or if perhaps it’s related to usingnpm link
instead of a proper release.@arunoda Would you accept a PR for adding
babel-polyfill
? Also, are you able to test under IE11?Thanks!
IE11 does not like the latest version of storybook (2.5.1) either. Seems like some other polyfills are still missing.
You want me to try and find out more about this issue or is somebody already on it?