2020-12-08 19:40

feat: add IE 11 preset

IE 11 keeps being a pain for storybook users and anyone brave enough to use it.

While more and more tools are shutting down it's support. Including Microsoft. Storybooks should be prepared as well with opt-in support.

The idea is to let user - opt in additional transpilers for external modules - force preset env to be use ie 11

This would improve performances when not used for storybook out of the box.

The original need of this preset is due to the way preset-create-react-app works. It's overriding Storybook default's babel config and removing es6 transpilers (for libs like acorn, semver, that drops IE 11)


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • weixin_39883433 weixin_39883433 5月前

    this is a great idea, for Create React App users. That being said, I just wanted to point out, that the issue I have had came from a React app created by hand, and not using the cra-cli. Still, if this was added by default, it would help those who don't use the cra-cli. Good work.

    点赞 评论 复制链接分享
  • weixin_39804059 weixin_39804059 5月前

    Hi , do you mean this product? https://www.npmjs.com/package/cra-cli

    The CRA preset for Storybook is only meant for users of react-scripts, with an officially supported CRA project (no customisation). If you customise CRA, you'll often need to also customise Storybook on top of the CRA preset.

    This preset - as I understand it - should allows us to remove IE11 from Storybook itself... instead supporting it via this preset, right ? Or maybe I misunderstood?

    点赞 评论 复制链接分享
  • weixin_39543835 weixin_39543835 5月前

    Exactly !

    点赞 评论 复制链接分享
  • weixin_39883433 weixin_39883433 5月前

    , That's great guys. But my point was, that I did not use the cra to create my react app and still ran into the issues this preset is meant to address.

    点赞 评论 复制链接分享