Open mgbetegan opened 6 months ago
The issue is that vue-select is using methods that are not available in a nodeJS environment. In this case, the import method. A workaround I apply to these situations is to wrap the import statement in an if statement that checks for the window variable.
let vueSelect
if (typeof window !== "undefined") {
(async () => {
const vueSelect = await import("vue-select")
})()
}
Describe the bug
I'm currently facing a problem where I installed vue-select for my project and I'm unable to create the build when I run vite-ssg build it gives the following error bellow
Reproduction
add vue-select in a vite project, when run the build with vite-ssg it thorws the error
System Info
Used Package Manager
yarn
Validations