From: SerKo <44749100+serkodev@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:38:42 +0000 (+0800) Subject: feat: improve tree shaking on `defineStore` (#2740) X-Git-Tag: pinia@2.2.2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3069105f15858393e5386bac7e62ea32a46c80bb;p=thirdparty%2Fvuejs%2Fpinia.git feat: improve tree shaking on `defineStore` (#2740) add `#__NO_SIDE_EFFECTS__` notation to `defineStore` --------- Co-authored-by: Eduardo San Martin Morote --- diff --git a/packages/pinia/src/store.ts b/packages/pinia/src/store.ts index 4cbec9f1..923c4b12 100644 --- a/packages/pinia/src/store.ts +++ b/packages/pinia/src/store.ts @@ -870,6 +870,8 @@ export function defineStore( _ExtractGettersFromSetupStore, _ExtractActionsFromSetupStore > +// improves tree shaking +/*#__NO_SIDE_EFFECTS__*/ export function defineStore( // TODO: add proper types from above idOrOptions: any,