From 62830f8fa40715bcf3964daa611d5dda395b7a34 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 19 Nov 2020 20:36:15 -0500 Subject: [PATCH] wip: better experimental feature warnings --- packages/compiler-sfc/src/compileScript.ts | 21 ++++----------------- packages/compiler-sfc/src/parse.ts | 13 ++++++++++++- packages/compiler-sfc/src/warn.ts | 19 +++++++++++++++++-- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 918e3f8d..f0f2b511 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -27,7 +27,7 @@ import { walk } from 'estree-walker' import { RawSourceMap } from 'source-map' import { CSS_VARS_HELPER, genCssVarsCode, injectCssVarsCalls } from './cssVars' import { compileTemplate, SFCTemplateCompileOptions } from './compileTemplate' -import { warnOnce } from './warn' +import { warnExperimental, warnOnce } from './warn' const DEFINE_OPTIONS = 'defineOptions' @@ -73,13 +73,8 @@ export function compileScript( ): SFCScriptBlock { const { script, scriptSetup, source, filename } = sfc - if (__DEV__ && !__TEST__ && scriptSetup) { - warnOnce( - `