[BUG] Vue SFC compilation breaking during SSR due to Vite internal stripLiteral
function
#11913
Closed
7 tasks done
Labels
bug: upstream
Bug in a dependency of Vite
Describe the bug
Suppose I have a simple
App.vue
file like this:As you can I see, I dynamically import two
.json
files, which I might do in the real world to get data. When I run my project, I get the following error:The error can be avoided by either:
class="whatever"
attribute.The reason for this is because the cause of the issue is the
stripLiteral
function used internally by Vite. For a more detailed explanation, please read theREADME
of the minimal reproduction repository.Reproduction
https://github.com/AaronBeaudoin/vite-ssr-issue-vue-sfc-dynamic-import
Steps to reproduce
Please see the minimal reproduction repository for reproduction steps and a detailed explanation.
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: