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

Fail to import using Vite + Vue 3 #288

Closed
hrvojeKol opened this issue Sep 14, 2023 · 1 comment
Closed

Fail to import using Vite + Vue 3 #288

hrvojeKol opened this issue Sep 14, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@hrvojeKol
Copy link

When trying to import in a project which uses Vite and Vue 3, it fails.

import { useShepherd } from 'vue-shepherd';

During runtime, it fails with an error:

Uncaught ReferenceError: process is not defined

Which leads to:
if ('false' === process.env.ES_BUILD) {

Here, process doesn't exit. We should use a different value as indicated in https://stackoverflow.com/questions/71083110/vue-uncaught-referenceerror-process-is-not-defined, but of course we cannot change it unless rebuilding the project

I was able to fix this by adding a statement in vite.config.js:


define: {
        'process.env': {}
    }

Is it possible to add support for Vite, or add some info in documentation regarding this?

@RobbieTheWagner
Copy link
Member

Duplicate of several other issues. See #174 (comment)

@RobbieTheWagner RobbieTheWagner added the duplicate This issue or pull request already exists label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants