I have a problem after migrating a project to vue@2.7.
Before the migration, this was the setup:
library: vue-demi@0.13.6
project1: vue@2.6
project2: vue@3.1
Everything was working fine until we migrated project1 to vue@2.7.
After the migration, we get this error whenever we import something from vue-demi in the library:
11:00:16 [vite] Error when evaluating SSR module /@fs/Users/facundo.allemand/projects/traveler-frontend/node_modules/.pnpm/@getyourguide+compass@1.5.26-beta.49_typescript@4.4.3+vue@2.7.8/node_modules/@getyourguide/compass/index.ts?v=e717953f:
TypeError: __vite_ssr_import_0__.defineComponent is not a function
at eval (/@fs/Users/facundo.allemand/projects/traveler-frontend/node_modules/.pnpm/@getyourguide+compass@1.5.26-beta.49_typescript@4.4.3+vue@2.7.8/node_modules/@getyourguide/compass/components/c-button/c-button.vue:33:41)
at async instantiateModule (/Users/facundo.allemand/projects/traveler-frontend/node_modules/.pnpm/vite@2.8.4_sass@1.49.7/node_modules/vite/dist/node/chunks/dep-971d9e33.js:56177:9)
This is the example content of the component producing the error:
<template>
<button>TEST</button>
</template>
<script lang="ts">
import { defineComponent } from "vue-demi";
export default defineComponent({
name: "CButton",
});
</script>
We have the exclude: ["vue-demi"], from the vite config, and we followed all the setup instructions.
I have a problem after migrating a project to
vue@2.7.Before the migration, this was the setup:
library:
vue-demi@0.13.6project1:
vue@2.6project2:
vue@3.1Everything was working fine until we migrated project1 to
vue@2.7.After the migration, we get this error whenever we import something from
vue-demiin thelibrary:This is the example content of the component producing the error:
We have the
exclude: ["vue-demi"],from the vite config, and we followed all the setup instructions.