### Describe the bug When building a Vue library with npm run build, a single button.vue component generates two files with the same base name, resulting in button.js and button2.js. The button2.js file contains only a simple re-export that imports from button.js, **expect only generate button.js** ### Reproduction https://stackblitz.com/edit/vitejs-vite-g1wlnnnn?file=dist%2Fes%2Fbutton%2Fbutton2.js ### Steps to reproduce 1. Run pnpm run build 2. Check the output in dist/es/button/ directory 3. Observe that both button.js and button2.js are generated ### System Info ```shell System: OS: macOS 14.1 CPU: (10) arm64 Apple M2 Pro Memory: 85.28 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.17.1 - ~/.nvm/versions/node/v22.17.1/bin/node Yarn: 1.22.22 - ~/.nvm/versions/node/v20.10.0/bin/yarn npm: 10.9.2 - ~/.nvm/versions/node/v22.17.1/bin/npm pnpm: 10.13.1 - ~/.nvm/versions/node/v20.10.0/bin/pnpm bun: 1.1.8 - ~/.bun/bin/bun Browsers: Chrome: 138.0.7204.158 Safari: 17.1 npmPackages: @vitejs/plugin-vue: ^6.0.0 => 6.0.0 @vitejs/plugin-vue-jsx: ^5.0.1 => 5.0.1 vite: ^7.0.4 => 7.0.4 ``` ### Used Package Manager npm ### Logs _No response_ ### Validations - [x] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md) - [x] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). - [x] Read the [docs](https://vite.dev/guide). - [x] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate. - [x] 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](https://github.com/vuejs/core) instead. - [x] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vite.dev/). - [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.