-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
Description
Describe the bug
For example:
import { Pose } from "@mediapipe/pose"
const p = new Pose();
Will build to:
const p = new Gu.Pose();
It seems any package name containing a "/" will cause the building process to prepend a name to the new class constructor.
And it will cause TypeError: Gu.Pose is not a constructor.
My current workaround is to remove the name appending after the project is built.
"vite": "^2.9.2"
"vue": "^3.2.25"
Reproduction
https://github.com/ElementLi/vite-build-error
System Info
System:
OS: macOS 12.3
CPU: (8) arm64 Apple M1
Memory: 72.73 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.15 - ~/node_modules/.bin/yarn
npm: 8.4.0 - /usr/local/bin/npm
Browsers:
Chrome: 100.0.4896.127
Firefox: 73.0.1
Safari: 15.4
npmPackages:
@vitejs/plugin-vue: ^2.3.1 => 2.3.1
vite: ^2.9.2 => 2.9.5
Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.