【问题标题】:Standard way to add custom react-scripts in create-react-app在 create-react-app 中添加自定义反应脚本的标准方法
【发布时间】:2021-04-26 14:44:25
【问题描述】:

我有一个从 create-react-app 创建的项目,并且在 typescript 中,我想在不弹出的情况下为自定义 react-scripts 添加支持,那么最好的方法是什么。

【问题讨论】:

    标签: typescript create-react-app react-scripts custom-react-scripts


    【解决方案1】:

    凯泽。

    通过使用此命令将此包用于 TS 中的自定义脚本

    create-react-app my-app --scripts-version custom-react-scripts

    (TS 的自定义反应脚本)[https://www.npmjs.com/package/custom-react-scripts-ts]

    顺便说一句,您要添加哪个自定义脚本

    【讨论】:

    • 我需要添加 post-css 支持和 typescript 脚本。
    • 是的,您可以将此脚本用于 css 或更少或 scss 文件
    猜你喜欢
    • 1970-01-01
    • 2019-10-27
    • 2019-02-16
    • 2018-01-22
    • 1970-01-01
    • 2018-06-12
    • 2020-03-10
    • 2021-05-15
    • 2017-09-28
    相关资源
    最近更新 更多