]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-vapor): remove access globalProperties warning (#13609)
authorzhiyuanzmj <260480378@qq.com>
Fri, 18 Jul 2025 09:15:20 +0000 (17:15 +0800)
committerGitHub <noreply@github.com>
Fri, 18 Jul 2025 09:15:20 +0000 (17:15 +0800)
packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts
packages/runtime-vapor/src/apiCreateApp.ts

index c82d432f1d4201435b1d12f95928434111b74701..6b21e5e5569eb70c7ecb72da4c86d50119b8bebc 100644 (file)
@@ -341,7 +341,7 @@ describe('api: createVaporApp', () => {
     })
   })
 
-  test('config.globalProperty', () => {
+  test.todo('config.globalProperty', () => {
     const { app } = define({
       setup() {
         return []
@@ -351,7 +351,7 @@ describe('api: createVaporApp', () => {
       app.config.globalProperties.msg = 'hello world'
     } catch (e) {}
     expect(
-      `app.config.globalProperties is not supported in vapor mode`,
+      `app.config.globalProperties is not supported in vapor mode components`,
     ).toHaveBeenWarned()
   })
 })
index ee4c00c880d70a050ee522126ccda3a089c6365b..bcc680eae42f5076974f6fea28f2b0205341c2a8 100644 (file)
@@ -88,18 +88,6 @@ function prepareApp() {
 }
 
 function postPrepareApp(app: App) {
-  if (__DEV__) {
-    app.config.globalProperties = new Proxy(
-      {},
-      {
-        set() {
-          warn(`app.config.globalProperties is not supported in vapor mode.`)
-          return false
-        },
-      },
-    )
-  }
-
   app.vapor = true
   const mount = app.mount
   app.mount = (container, ...args: any[]) => {