技术控

    今日:72| 主题:49409
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Configure create-react-app without ejecting

[复制链接]
妳好像腦袋大 发表于 2016-10-2 18:47:49
149 1

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

Configure create-react-app without ejecting-1 (interested,additional,developer,including,interface)
         A confused developer trying to configure create-react-app       If you’re working with React, you’re probably familiar with the create-react-app tool by now. If you’re not: it’s an official command line interface for building React applications with no build configuration.
  With no build configuration.
  With no build configuration…
  With no build configuration!? But we need that! Kind of …

  Now wait! Don’t jump on me with the “but it’s just supposed to be a simple tool, it doesn’t need any additional configuration!” argument!
   :point_up_2: I posted a sneak peek of create-react-app + decorators on Twitter , and it looks like people are interested in it. But “decorators” is only one of the additional features we might need so we can switch to create-react-app for generating and building apps.
  Many developers (including me) want to use create-react-app as their main dev setup for React apps but they can’t because they’re missing one or two features.
  
       
  • Someone needs just SASS.   
  • Someone swears that if create-react-app had CSS modules, he would ditch his current setup instantly.   
  • Someone (me) just wanted decorator support because I’m using MobX in my projects. I know that MobX can be used without decorators, and i know they’re an experimental feature, but the code just looks cleaner and more readable with them.  
  The create-react-app team clearly stated that it doesn’t plan to add support for any experimental Babel features, or for custom webpack/babel configs. It totally makes sense, and after a few days of exploring the codebase, i completely understand them and support them even more in their decision.
   *whispers silently* but devs still want some config options…
  So what they do right now to customize their setup is:
  
       
  • They either eject their app and modify webpack/babel manually (opting to lose future create-react-app and react-scripts support in the feature)   
  • Fork react-scripts and add support for just the X feature they need   
  • Use another tool and complain that create-react-app is nice but doesn’t suit their needs  
   What i wanted to do is to write something that’s a little more flexible, allow different, but simple configurations, be always up to date with the original react-scripts, and (hopefully) satisfy everybody.
友荐云推荐




上一篇:Reactive Microservices: Driving Application Modernization Efforts
下一篇:谷歌为机器学习开放丰富的映像资料库
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

晕晕啊呼呼 发表于 2016-10-2 19:16:46
看在妳好像腦袋大的面子上,认真回帖!
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表