Explorar el Código

feat: remove experimental status of `<script setup>`

Evan You hace 4 años
padre
commit
27104eaaf0
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1 3
      packages/compiler-sfc/src/compileScript.ts

+ 1 - 3
packages/compiler-sfc/src/compileScript.ts

@@ -123,9 +123,7 @@ export function compileScript(
   const enableRefSugar = !!options.refSugar
   const parseOnly = !!options.parseOnly
 
-  if (scriptSetup) {
-    !parseOnly && warnExperimental(`<script setup>`, 227)
-  } else if (parseOnly) {
+  if (parseOnly && !scriptSetup) {
     // in parse-only mode, construct a fake script setup so we still perform
     // the full parse logic.
     scriptSetup = {