vite-plugin-vue
vite-plugin-vue copied to clipboard
Inconsistent output between development and production
Related plugins
-
[x] plugin-vue
-
[ ] plugin-vue-jsx
Describe the bug
In development, components with <script setup> and inline template have a render property, but it's absent in production.
Reproduction
https://stackblitz.com/edit/vitejs-vite-vo3ncylb?file=src%2FApp.vue&terminal=dev
Steps to reproduce
- Run
npx vite. You'll see "Component" in the preview pane - Create a new terminal
- Run
npx vite buildand thennpx vite preview - Go to the new address and the preview pane is now blank
System Info
--
Used Package Manager
npm
Logs
No response
Validations
- [x] Follow our Code of Conduct
- [x] Read the Contributing Guidelines.
- [x] Read the docs.
- [x] Check that there isn't already an issue 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 instead.
- [x] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [x] The provided reproduction is a minimal reproducible example of the bug.
I guess the render property is not part of the public API. refs #11