From 7427d005c8b9cf32755478f721bcacbc5a8c9999 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Mon, 22 May 2023 11:51:50 -0700 Subject: [PATCH] chore: vue updates (#2211) * chore: updates node modules * chore: fixes reactivity warning --- package.json | 1 + pnpm-lock.yaml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tsconfig.json | 9 ++++++++- vite.config.ts | 3 ++- 4 files changed, 57 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 156bf3f4..1175b642 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "@types/semver": "^7.5.0", "@vitejs/plugin-basic-ssl": "^1.0.1", "@vitejs/plugin-vue": "4.2.3", + "@vue-macros/reactivity-transform": "^0.3.7", "@vue/compiler-sfc": "^3.3.4", "@vue/test-utils": "^2.3.2", "bumpp": "^9.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9dc77378..cf00b532 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -126,6 +126,9 @@ devDependencies: '@vitejs/plugin-vue': specifier: 4.2.3 version: 4.2.3(vite@4.3.8)(vue@3.3.4) + '@vue-macros/reactivity-transform': + specifier: ^0.3.7 + version: 0.3.7(vue@3.3.4) '@vue/compiler-sfc': specifier: ^3.3.4 version: 3.3.4 @@ -1106,6 +1109,42 @@ packages: typescript: 5.0.4 dev: true + /@vue-macros/common@1.3.1(vue@3.3.4): + resolution: {integrity: sha512-Lc5aP/8HNJD1XrnvpeNuWcCf82bZdR3auN/chA1b/1rKZgSnmQkH9f33tKO9qLwXSy+u4hpCi8Rw+oUuF1KCeg==} + engines: {node: '>=14.19.0'} + peerDependencies: + vue: ^2.7.0 || ^3.2.25 + peerDependenciesMeta: + vue: + optional: true + dependencies: + '@babel/types': 7.21.5 + '@rollup/pluginutils': 5.0.2 + '@vue/compiler-sfc': 3.3.4 + local-pkg: 0.4.3 + magic-string-ast: 0.1.2 + vue: 3.3.4 + transitivePeerDependencies: + - rollup + dev: true + + /@vue-macros/reactivity-transform@0.3.7(vue@3.3.4): + resolution: {integrity: sha512-o+u5qstvUjNoaZjr4lUtNf5MuLgQHikvurnk6b2DFd9nB52j+BqOhI22uyn6K6TTAU0i0/PxT5YgwDlwVdvEUw==} + engines: {node: '>=14.19.0'} + peerDependencies: + vue: ^2.7.0 || ^3.2.25 + dependencies: + '@babel/parser': 7.21.8 + '@vue-macros/common': 1.3.1(vue@3.3.4) + '@vue/compiler-core': 3.3.4 + '@vue/shared': 3.3.4 + magic-string: 0.30.0 + unplugin: 1.3.1 + vue: 3.3.4 + transitivePeerDependencies: + - rollup + dev: true + /@vue/compiler-core@3.3.4: resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} dependencies: @@ -3013,6 +3052,13 @@ packages: yallist: 4.0.0 dev: true + /magic-string-ast@0.1.2: + resolution: {integrity: sha512-P53AZrzq7hclCU6HWj88xNZHmP15DKjMmK/vBytO1qnpYP3ul4IEZlyCE0aU3JRnmgWmZPmoTKj4Bls7v0pMyA==} + engines: {node: '>=14.19.0'} + dependencies: + magic-string: 0.30.0 + dev: true + /magic-string@0.30.0: resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} engines: {node: '>=12'} diff --git a/tsconfig.json b/tsconfig.json index d5825a2e..8d193257 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,14 @@ "@/*": ["assets/*"] }, "jsx": "preserve", - "types": ["vitest", "vite/client", "vue/ref-macros", "vite-plugin-pages/client", "vite-plugin-vue-layouts/client"] + "types": [ + "vitest", + "vite/client", + "vue/ref-macros", + "vite-plugin-pages/client", + "vite-plugin-vue-layouts/client", + "@vue-macros/reactivity-transform/macros-global" + ] }, "include": ["assets/**/*.ts", "assets/**/*.d.ts", "assets/**/*.vue"], diff --git a/vite.config.ts b/vite.config.ts index b11aea42..23d848d1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,6 +1,7 @@ import path from "path"; import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; +import ReactivityTransform from "@vue-macros/reactivity-transform/vite"; import Icons from "unplugin-icons/vite"; import Components from "unplugin-vue-components/vite"; import AutoImport from "unplugin-auto-import/vite"; @@ -25,8 +26,8 @@ export default defineConfig(() => ({ }, }, plugins: [ + ReactivityTransform(), vue({ - reactivityTransform: true, template: { compilerOptions: { whitespace: "preserve",