From: Eduardo San Martin Morote Date: Thu, 30 Sep 2021 08:19:55 +0000 (+0200) Subject: build: tree shake devtools X-Git-Tag: pinia@2.0.0-rc.10~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a5c425bf2f7bbe60b8155f0c320e0f46bda49096;p=thirdparty%2Fvuejs%2Fpinia.git build: tree shake devtools This change in order allows to correctly remove the devtools code --- diff --git a/packages/pinia/src/createPinia.ts b/packages/pinia/src/createPinia.ts index be52f602..20df76ef 100644 --- a/packages/pinia/src/createPinia.ts +++ b/packages/pinia/src/createPinia.ts @@ -32,7 +32,7 @@ export function createPinia(): Pinia { app.provide(piniaSymbol, pinia) app.config.globalProperties.$pinia = pinia /* istanbul ignore else */ - if (IS_CLIENT && __DEV__) { + if (__DEV__ && IS_CLIENT) { registerPiniaDevtools(app, pinia) } toBeInstalled.forEach((plugin) => _p.push(plugin))