diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index e9b822cb6e..fd721eb33b 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -1226,8 +1226,8 @@ export default class Component { if (variable.module) { should_add_as_dependency = false; component.warn(node as any, { - code: 'module-vars-not-reactive', - message: `"${name}" is a module variable, it will not be reactive` + code: 'module-script-reactive-declaration', + message: `"${name}" is declared in a module variable and will not be reactive` }); } } diff --git a/test/validator/samples/reactive-module-variable/warnings.json b/test/validator/samples/reactive-module-variable/warnings.json index 865d773728..d09bd3bee7 100644 --- a/test/validator/samples/reactive-module-variable/warnings.json +++ b/test/validator/samples/reactive-module-variable/warnings.json @@ -1,7 +1,7 @@ [ { - "code": "module-vars-not-reactive", - "message": "\"foo\" is a module variable, it will not be reactive", + "code": "module-script-reactive-declaration", + "message": "\"foo\" is declared in a module variable and will not be reactive", "pos": 67, "start": { "character": 67,