update: hot reload for mp
This commit is contained in:
parent
f4601c42b8
commit
063a76ab22
|
@ -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
|
|
@ -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();
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -15,7 +15,7 @@ const Counter = (props, store) => {
|
|||
|
||||
Counter.store = _ => {
|
||||
return {
|
||||
count: 3,
|
||||
count: 1,
|
||||
add() {
|
||||
this.count++
|
||||
this.update()
|
||||
|
|
Loading…
Reference in New Issue