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

No component in build version #265

Closed
7 tasks done
psqq opened this issue Oct 12, 2023 · 2 comments
Closed
7 tasks done

No component in build version #265

psqq opened this issue Oct 12, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@psqq
Copy link

psqq commented Oct 12, 2023

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-vanilla

Change 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 dist

If 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.11

Used Package Manager

npm

Logs

No response

Validations

@psqq
Copy link
Author

psqq commented Oct 12, 2023

I can try to find a smaller example to reproduce and write a test later.

@sapphi-red sapphi-red transferred this issue from vitejs/vite Oct 12, 2023
@sapphi-red
Copy link
Member

Duplicate of #11

@sapphi-red sapphi-red marked this as a duplicate of #11 Oct 12, 2023
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Oct 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants