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

[vite 3.0.7] Vue is not correctly imported in production #9666

Closed
7 tasks done
kingyue737 opened this issue Aug 14, 2022 · 5 comments
Closed
7 tasks done

[vite 3.0.7] Vue is not correctly imported in production #9666

kingyue737 opened this issue Aug 14, 2022 · 5 comments
Labels
pending triage regression The issue only appears after a new release

Comments

@kingyue737
Copy link
Contributor

kingyue737 commented Aug 14, 2022

Describe the bug

I import vue and a 3rd package portal-vue. It works fine in dev, but raises the following error if I preview the bundle built:

Vue.extend is not a function

This bug looks very similar to an issue vitejs/vite-plugin-vue#34 I reported previously but occurs only since v3.0.6.

✔️Vite v3.0.5 dev
✔️Vite v3.0.5 production
✔️Vite v3.0.6 v3.0.7 dev
❌Vite v3.0.6 v3.0.7 production

Reproduction

https://stackblitz.com/edit/vitejs-vite-e9wniz

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /bin/yarn
    npm: 7.17.0 - /bin/npm
  npmPackages:
    vite: ^3.0.7 => 3.0.7

Used Package Manager

pnpm

Logs

No response

Validations

@faradaytrs
Copy link

Same for react, since 3.0.6 we got a problem in production build which says "useQuery" is not defined. This is a library we use from "@tanstack/react-query" package.

@sodatea
Copy link
Member

sodatea commented Aug 16, 2022

Likely fixed by #9653, pending a new patch release

@sodatea sodatea added the regression The issue only appears after a new release label Aug 16, 2022
@patak-dev
Copy link
Member

Running vite-ecosystem-ci so we can release 3.0.8

@patak-dev
Copy link
Member

3.0.8, which includes #9653 is out. @kingyue737 would you try with 3.0.8?

@kingyue737
Copy link
Contributor Author

Thanks for the patch! fixed in 3.0.8

kingyue737 added a commit to kingyue737/vitify-admin that referenced this issue Aug 16, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending triage regression The issue only appears after a new release
Projects
None yet
Development

No branches or pull requests

4 participants