Skip to content

Commit

Permalink
fix: keep no side effect comment when minifying
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Oct 21, 2024
1 parent 254eec7 commit a31fb87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/pinia/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,8 @@ export function defineStore<Id extends string, SS>(
_ExtractGettersFromSetupStore<SS>,
_ExtractActionsFromSetupStore<SS>
>
// improves tree shaking
/*#__NO_SIDE_EFFECTS__*/
// allows unused stores to be tree shaken
/*! #__NO_SIDE_EFFECTS__ */
export function defineStore(
// TODO: add proper types from above
idOrOptions: any,
Expand Down

2 comments on commit a31fb87

@smakinson
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@posva I upgraded to 2.2.5 last night and a couple things stopped working on Netlify, but locally was ok with dev server. I reverted to 2.2.4 and all was well again on Netlify. Perhaps this change caused something to be tree shaken that should not be?

@posva
Copy link
Member Author

@posva posva commented on a31fb87 Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open an issue with a boiled down reproduction if you have one. Otherwise I can help you directly in a call

Please sign in to comment.