chore: warnings for ref transform
This commit is contained in:
@@ -48,7 +48,7 @@ import {
|
||||
genNormalScriptCssVarsCode
|
||||
} from './cssVars'
|
||||
import { compileTemplate, SFCTemplateCompileOptions } from './compileTemplate'
|
||||
import { warnExperimental, warnOnce } from './warn'
|
||||
import { warnOnce } from './warn'
|
||||
import { rewriteDefault } from './rewriteDefault'
|
||||
import { createCache } from './cache'
|
||||
import {
|
||||
@@ -652,10 +652,6 @@ export function compileScript(
|
||||
|
||||
// apply ref transform
|
||||
if (enableRefTransform && shouldTransformRef(script.content)) {
|
||||
warnExperimental(
|
||||
`ref sugar`,
|
||||
`https://github.com/vuejs/rfcs/discussions/369`
|
||||
)
|
||||
const { rootVars, importedHelpers } = transformRefAST(
|
||||
scriptAst,
|
||||
s,
|
||||
@@ -900,10 +896,6 @@ export function compileScript(
|
||||
|
||||
// 3. Apply ref sugar transform
|
||||
if (enableRefTransform && shouldTransformRef(scriptSetup.content)) {
|
||||
warnExperimental(
|
||||
`ref sugar`,
|
||||
`https://github.com/vuejs/rfcs/discussions/369`
|
||||
)
|
||||
const { rootVars, importedHelpers } = transformRefAST(
|
||||
scriptSetupAst,
|
||||
s,
|
||||
|
||||
@@ -14,18 +14,3 @@ export function warn(msg: string) {
|
||||
`\x1b[1m\x1b[33m[@vue/compiler-sfc]\x1b[0m\x1b[33m ${msg}\x1b[0m\n`
|
||||
)
|
||||
}
|
||||
|
||||
export function warnExperimental(feature: string, url: string) {
|
||||
// eslint-disable-next-line
|
||||
if (typeof window !== 'undefined') {
|
||||
return
|
||||
}
|
||||
warnOnce(
|
||||
`${feature} is still an experimental proposal.\n` +
|
||||
`Follow its status at ${url}.`
|
||||
)
|
||||
warnOnce(
|
||||
`When using experimental features,\n` +
|
||||
`it is recommended to pin your vue dependencies to exact versions to avoid breakage.`
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user