-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
vue-loader error with script setup: Cannot read property 'content' of null #12591
Comments
This seems to be caused by an outdated version of |
I've tried update |
I think it's caused by https://github.com/vuejs/vue/blob/main/packages/compiler-sfc/src/compileScript.ts#L1838 Event handler like A possible fix is #12594 , which strips the strings in the code before detecting type syntax. And I've found that Vue3 has the same problem. I think the fix can be ported to vuejs/core too. |
Version
2.7.0-beta.8
Reproduction link
github.com
Steps to reproduce
yarn && yarn build
What is expected?
Build succeeds.
What is actually happening?
As shown in the reproduction repo, the problem occurs on a very specific condition:
<script setup lang="ts">
import
:
in a string and;
in event handlerThe text was updated successfully, but these errors were encountered: