爱意满满的作品展示区。
jchencode

基于 Vite + React 构建项目框架

  •  
  •   jchencode · Apr 19, 2021 · 2217 views
    This topic created in 1932 days ago, the information mentioned may be changed or developed.

    前言

    大概在 2019 年的时候,为公司搭建了一套项目框架,截止到今天,用起来很不错,最近 Vite 太火,折腾了下,花了两天的时间,用 Vite 替换了 WebpackWebpack5Webpack4 都有,切换分支即可),体验直接起飞,基于 Vite + React + Ant Design + Mobx + ESLint + TypeScript 的项目框架。

    特点

    • 快速开始,只要您了解 reactmobxwebpackreact router,就可以快速搭建中后台管理平台。

    • 路由匹配,包括 url 输入,js 跳转,菜单切换。

    • Loading,不需要重复写组件 loading 判断。

    Demo

    tristana

    项目地址

    tristana

    关于命名

    由于本人非常喜欢玩 LOL 射手小炮,所以叫 tristana

    能否使用在生产环境?

    当然,目前我司多个产品线在使用中。

    启动

    $ git clone https://github.com/xuya227939/tristana.git
    
    $ cd tristana
    
    $ git checkout vite
    
    $ npm install
    
    $ npm run dev
    

    打包

    $ npm run build
    

    是否支持 IE8?

    不支持

    结语

    大佬们觉得不错的话,可以给个 Star 🌟,也欢迎给项目提 issues ~

    4 replies    2021-04-21 17:40:13 +08:00
    gdrk
        1
    gdrk  
       Apr 19, 2021
    支持,不过老哥的 demo 略显简陋啊
    jchencode
        2
    jchencode  
    OP
       Apr 19, 2021
    @gdrk 嗯,主要提供的是一个项目框架,业务页面可以用这个框架随意开发。
    sunwang
        3
    sunwang  
       Apr 21, 2021
    好家伙,没填账号密码点了下登录 我的眼睛差点瞎了。。
    看了下库挺不错的,有参考意义,已 star
    jchencode
        4
    jchencode  
    OP
       Apr 21, 2021
    @sunwang 现在应该不需要填账号密码了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5764 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 06:18 · PVG 14:18 · LAX 23:18 · JFK 02:18
    ♥ Do have faith in what you're doing.