update: hot reload for mp

This commit is contained in:
dntzhang 2019-08-08 11:08:00 +08:00
parent f4601c42b8
commit 063a76ab22
4 changed files with 3 additions and 8 deletions

View File

@ -1,8 +1,3 @@
# omi-kbone
使用 [kbone](https://github.com/wechat-miniprogram/kbone) 和 [omis](https://github.com/Tencent/omi/tree/master/packages/omis) 多端开发(小程序和Web)
# Todo
* 热更新
* build web

View File

@ -191,7 +191,7 @@ var counter_Counter = function Counter(props, store) {
counter_Counter.store = function (_) {
return {
count: 3,
count: 1,
add: function add() {
this.count++;
this.update();

View File

@ -9,7 +9,7 @@
"mp"
],
"scripts": {
"start": "cross-env NODE_ENV=production webpack --config scripts/webpack.mp.config.js --progress --hide-modules",
"start": "cross-env NODE_ENV=production webpack --config scripts/webpack.mp.config.js --watch --progress --hide-modules",
"web": "node scripts/start.js",
"build": "PUBLIC_URL=. node scripts/build.js",
"build-windows": "set PUBLIC_URL=.&& node scripts/build.js",

View File

@ -15,7 +15,7 @@ const Counter = (props, store) => {
Counter.store = _ => {
return {
count: 3,
count: 1,
add() {
this.count++
this.update()