自己实现一个自定义React项目脚手架「ReactCli」

前言

首先为什么想到自己实现一个React脚手架呢?是因为之前刚接触create-react-app时,觉得不太灵活。虽然文件目录很清晰,但是还是觉得不如VueCLI的可以自定义配置更加灵活。当然React官方提供了可以暴露配置的命令npm run eject,说再多不如自己实现一个。
脚手架一览
在这里插入图片描述

文档
Project operation
Install

npm install

Start

npm run dev

Build

npm run build

Document implication
build

Webpack configuration item.
mock

Analog data.
public

Template file.
.babelrc

Babel configuration.
.gitignore

There is no need to add NPM packages.
postcss.config.js

Postcss configuration file.
src

Project home folder.
SRC folder main file
assets

Static folder.
component

Place to store components.
request

HTTP request configuration.
router

Routing configuration.
store

State management.
utils

 

更多内容请见原文,原文转载自:https://blog.csdn.net/weixin_44519496/article/details/119882441

posted @   忘川信使  阅读(108)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示