-
-
Notifications
You must be signed in to change notification settings - Fork 182
Closed as not planned
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Describe the bug
One component ceases to exist in the production build created via vite build. I hope I correctly identified that this is a vite bug. When I use npm run dev the component is shown.
When this component is explicitly exported and added to components: { ... } it starts working everywhere. It turns out that vite build for some reason excludes it from the build.
I created a repository that reproduces this error: https://github.com/psqq/vite-no-form
Reproduction
https://github.com/psqq/vite-no-form
Steps to reproduce
Steps:
cd ~/tmp
npm create vite@latest✔ Project name: … json-forms
✔ Select a framework: › Vue
✔ Select a variant: › TypeScript
cd ~/tmp/json-forms
npm install
npm i --save @jsonforms/core @jsonforms/vue @jsonforms/vue-vanillaChange source code: psqq/vite-no-form@a0fd4d9
dev
If you run npm run dev the form is displayed
build
If you run it:
npm run build
npx http-server -c-1 distIf you uncomment JsonForm2 in App.vue, both forms will be displayed after assembly.
System Info
System:
OS: Linux 6.4 Arch Linux
CPU: (16) x64 AMD Ryzen 7 1800X Eight-Core Processor
Memory: 20.51 GB / 31.27 GB
Container: Yes
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.8.0 - ~/.nvm/versions/node/v20.8.0/bin/node
npm: 10.1.0 - ~/.nvm/versions/node/v20.8.0/bin/npm
npmPackages:
@vitejs/plugin-vue: ^4.2.3 => 4.4.0
vite: ^4.4.5 => 4.4.11Used Package Manager
npm
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 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.
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists