Skip to content

No component in build version #265

@psqq

Description

@psqq

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions