1.1.5 • Published 5 years ago
@aiou/preact-template v1.1.5
@aiou/preact-template
spa preact template(maybe use in mobile)。
比较了一下在未
gzip情况下的bundle size。react是~200kb左右,preact是~67kb。开启了gzip之后,react是~67kb。体积比较还是很明显的。一般来说vue是移动端site的选择,vue在gzip情况下体积是40kb。react和vue区别好像没有那么明显了。 至于是否选择preact还是react见仁见智。因为使用based on react的第三方库,兼容性很不错特别是那些high star repo。但是其他多多少少会有一点小问题的。
Features
- use webpack
- support ts
<link />会加上preload- 在移动端可以通过
http:<ip>:port方式访问
Dependencies
- typescripts
- css
- stylus
- post-css
- react
- typescript
- webpack v4
For Devlopers
- custom
release scriptin package.json and other package info
推荐使用VSCODE IDE
- IDE - VSCode
- install
plugin- stylint - install
plugin- tslint
- install
- install redux-dev-tools in Chrome Store
- IDE - VSCode
可以使用Rucksack和Rupture 加速
stylus开发。分别封装了一些好用postcss mixins和stylus mixins for media query路由使用了
react-router docs里面的router config的方式,是否合理见仁见智使用
rematch作为redux framework。- 如要使用
redux-observable,我也封装了一个rematch-observable。 - 如有
data request。推荐使用swr进行api的缓存
- 如要使用