Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrade to 2.7: __vite_ssr_import_0__.defineComponent is not a function #182

Open
fallemand opened this issue Aug 5, 2022 · 2 comments

Comments

@fallemand
Copy link

fallemand commented Aug 5, 2022

I have a problem after migrating a project to [email protected].

Before the migration, this was the setup:
library: [email protected]
project1: [email protected]
project2: [email protected]

Everything was working fine until we migrated project1 to [email protected].
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/@[email protected][email protected][email protected]/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/@[email protected][email protected][email protected]/node_modules/@getyourguide/compass/components/c-button/c-button.vue:33:41)
    at async instantiateModule (/Users/facundo.allemand/projects/traveler-frontend/node_modules/.pnpm/[email protected][email protected]/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.

@wobsoriano
Copy link
Contributor

Curious to see this. Do you have a simple repro? This is why I use render functions when doing vue2/3 compat library with vue-demi

@sxzz
Copy link
Member

sxzz commented Sep 4, 2022

Could you please provide a minimum reproduction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants