Skip to content

yuminjustin/spotlight-templates-react-mobx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

spotlight-templates-react-mobx

spotlight scaffold template for react + mobx

Use:

 spotlight mobx my-project

 cd my-project

 npm install

 npm run dev

 npm run build

此模板是react+mobx环境
This template is base on webpack, support for react + mobx development

1.配置在build/config.js 当中;
Configures in build/config.js

2.内含todo demo;
Include todo demo

todo操作方式:添加之后,双击修改,点击checkbox删除;(未做本地存储和筛选功能)

3.由于router使用的是history方式,build之后的代码需要放在根目录,不然就会404
Because the router mod is using "history". So after you run build , production code have to run at website's root path ,or all page is 404

如果使用的history路由需要做以下操作:
1)、在config.js中需要将dev和build的html5Router属性设置成true;
2)、gulp需要全局安装;
3)、此模板打包已支持Apache, 你只需要确认你的Apache开启rewrite功能(ngix 需要另外配置,如下);

location / {
    try_files $uri $uri/ /index.html;
}

4.Upgrade to webpack5

Let's mobx!

Releases

No releases published

Packages

No packages published