From cdc9f336fd62c40b6b54637cdcd5fc4a941aa38a Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 17 Nov 2020 18:54:47 -0500 Subject: [PATCH] wip: new cssVars SSR integration + fix cssVars SSR injection for suspense --- packages/compiler-core/src/options.ts | 1 + .../src/transforms/transformElement.ts | 2 +- packages/compiler-sfc/src/compileScript.ts | 10 +--- packages/compiler-sfc/src/compileTemplate.ts | 9 ++++ packages/compiler-sfc/src/cssVars.ts | 29 +++++++++-- packages/compiler-sfc/src/index.ts | 1 + .../compiler-sfc/src/stylePluginScoped.ts | 13 ++--- packages/compiler-sfc/src/warn.ts | 12 +++++ .../__tests__/ssrInjectCssVars.spec.ts | 49 ++++++++++++------- packages/compiler-ssr/src/runtimeHelpers.ts | 4 +- .../compiler-ssr/src/ssrCodegenTransform.ts | 15 ++---- .../src/transforms/ssrInjectCssVars.ts | 36 +++++++++----- .../__tests__/ssrResolveCssVars.spec.ts | 27 ---------- .../src/helpers/ssrResolveCssVars.ts | 11 ----- packages/server-renderer/src/index.ts | 1 - 15 files changed, 117 insertions(+), 103 deletions(-) create mode 100644 packages/compiler-sfc/src/warn.ts delete mode 100644 packages/server-renderer/__tests__/ssrResolveCssVars.spec.ts delete mode 100644 packages/server-renderer/src/helpers/ssrResolveCssVars.ts diff --git a/packages/compiler-core/src/options.ts b/packages/compiler-core/src/options.ts index 02ac12e6..bb18faf0 100644 --- a/packages/compiler-core/src/options.ts +++ b/packages/compiler-core/src/options.ts @@ -166,6 +166,7 @@ export interface TransformOptions extends SharedTransformCodegenOptions { scopeId?: string | null /** * SFC `