vuejs / pinia

🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support
https://pinia.vuejs.org
MIT License
13.12k stars 1.05k forks source link

Pinia playground doesn't work with option store #2510

Closed nekolab closed 11 months ago

nekolab commented 11 months ago

Reproduction

https://play.pinia.vuejs.org/#eNqNVE1z2jAQ/SsaXyANSEnTZqYMZGgzHNJD20ly9MVYC4hYHyPJhA7j/961ZIyhpcPFY+2+t/t2tdpd8tUYuikhGSVjl1thPHHgS0OKTC0naeJdmjykSkijrSc74ry28KqfYeFIRRZWS9IzQomsl6oOrHTwqEvlwb7UhBZKWR7NAZ5r5TxpLBE4OaX2rw7IXcQOCNflvIgwDD3pqup3wyF3zGJZWAQePEhTZB7wRMh4dfuwa2I2BKoyiWqrMUNfwJgWgmbygXzEdGg5UoBwE9Hz0nutyDQvRP6G7TuKLVRuQYLy2NKn/f+YRQ7yx6yVlwyS2MuhzAxdO63wgnZ1irRx4L2MSLDUNrzB+pwmK++NGzGWc4U0DoXYWKrAM2UkmyKMWVQkJAy5ltM7eke/MC6c75opODmcW/3uwGKQNBl00jA0bsAOLSgOFuylaU9o3dQnrvPpw6AdJ8R2/abBXk/x2lFtlyyez4YJejhsvNaFG2ZGXFpDlzO9p5/pLSvEnGEiJlD79q9mDTnIS6LvodMbevuJ3rNrDJkmdaAqVRUOg3f4AhZieTIKuZZGFGB/Gi/whRyNRFYU+v17sHlbQisrX0H+9g/72m2j0l8Wwo10SvGZXQKObe2evfyALf63Tql5WTTjd8b5DE4XZa0xwr6ViqPsDi6ofQqTLdTy1c22HpTbF1ULDd0I+NDax/+UfpCLU9bpYvMaqXfYwnZXcVgIBcd76rDSYBtgcQGdrrVJl9zv7XfbIEpxHp/yiPSvyOSB9JstMiI3A1JvmRHpzXiZWa57pLoKhaFopLu2ks6SwTAhXIgV/mhcSriRAje2JstDN9oI7cpBEY2JEL8SLrKvr6MtkutvhSszqf4AAZwSvw==

Steps to reproduce the bug

  1. Click on the "Increment" button

Expected behavior

count and doubleCount increment per click

Actual behavior

count and doubleCount fixed to 0

Additional information

The default example (implemented with setup store) works fine

nekolab commented 11 months ago

Hi @posva, thanks for the quick fixing, but I noticed the online playground is still broken now, seems like the playground is not updated. Shall we update it? Thanks

posva commented 11 months ago

The playground is not using the right import maps: https://play.pinia.vuejs.org/#eNqNVE1z2jAQ/SsaXyANSKG0OTCGoc1wSA9tJ8nRF2MvoERfI8mEGcb/vWvJGEM7mV4YefXe09snLcfkmzF0X0EyS1JXWG48ceArQ0SutvMs8S5LFpni0mjryZE4ry286CfYOFKTjdWSDAxXPB9kqgerHDzoSnmwzw2hg1JWxHKAF1o5T9pKBM6vqcObM/IYsSNS6motIgyl531Xw74cclMW28Im8MODNCL3gF+EpLvJ4thqtgSqcolu65ThXsCYDoJl8ol8xuOwcuEA4Sai15X3WpFlIXjxhvFdaHNVWJCgPEb6eFqnLHKQn7LOXjJKYpZjmRv66rTCCzo2R2TtBt7LjIRKUwtX0FSyhIU1BSfHa6vfHVjkZ8noBF3ibbMS9l5r4ca54ZG28964GWNFqRBfguB7SxV4poxkf3GW9/QrnTDB1wwPYlyVcLg8BhnjEuT/qJ+gyzs6+ULvg+p+2orKRrURrTNVYyze4VvY8O1VKIWWhguwv4zn+FYuwsmF0O8/Qs3bCjqLxQ6Kt3/UX90huv5tAePbQ68tn9st4AU226vnn3DAdbcpdVkJRH+w+QROi6rxGGHfK1Wi7R4uuH0Md8zV9sWtDh6UOzXVGA1pBHyI+eGD1s92p3TaS7F9l9Q7jLCb2hI2XMHlxJ6HGw4BFkfxesDnffJwcJryUbTiPD7qGRnekPmCDNt5mpG7EWnmbUYGq7LKbakHpL4JjaFppLuuk964oUyQC1phReN44mwGbowmL0IanUI3fGiiLRHid9xF9u1trEVy81vjn0dS/wGjFLwX

This was already fixed