Skip to content

Commit 3069105

Browse files
serkodevposva
andauthored
feat: improve tree shaking on defineStore (#2740)
add `#__NO_SIDE_EFFECTS__` notation to `defineStore` --------- Co-authored-by: Eduardo San Martin Morote <[email protected]>
1 parent b90c595 commit 3069105

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/pinia/src/store.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,8 @@ export function defineStore<Id extends string, SS>(
870870
_ExtractGettersFromSetupStore<SS>,
871871
_ExtractActionsFromSetupStore<SS>
872872
>
873+
// improves tree shaking
874+
/*#__NO_SIDE_EFFECTS__*/
873875
export function defineStore(
874876
// TODO: add proper types from above
875877
idOrOptions: any,

0 commit comments

Comments
 (0)