From 1a7243ab3d4d1c41935677f38db1fd71a03f30e9 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 4 Jun 2020 18:30:11 -0400 Subject: [PATCH] fix: force reload on SFC scoped status change fix #348 --- src/node/server/serverPluginVue.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node/server/serverPluginVue.ts b/src/node/server/serverPluginVue.ts index 9db6ea7812f849..eb87aa1e0f4042 100644 --- a/src/node/server/serverPluginVue.ts +++ b/src/node/server/serverPluginVue.ts @@ -223,8 +223,9 @@ export const vuePlugin: ServerPlugin = ({ return sendReload() } + // force reload if scoped status has changed if (prevStyles.some((s) => s.scoped) !== nextStyles.some((s) => s.scoped)) { - needRerender = true + return sendReload() } // only need to update styles if not reloading, since reload forces