Open
Description
Reproduction
https://github.com/bodograumann/pinia-hmr-optional-attributes
Steps to reproduce the bug
git clone https://github.com/bodograumann/pinia-hmr-optional-attributes
cd pinia-hmr-optional-attributes
npm install
npm run dev
xdg-open http://localhost:5173
- Press the "Increment" button. Sign says "positive".
touch src/store/counter.ts
Expected behavior
All the state should be preserved.
Actual behavior
counter.nr
is preserved as 1
, but counter.sign
is lost. The page shows -
, while it should show positive
.
Additional information
The relevant code is here:
pinia/packages/pinia/src/hmr.ts
Lines 41 to 43 in 93b5546
Metadata
Assignees
Type
Projects
Status
💬 In discussion
Activity