-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
The following error is logged:
10/23/2022, 4:15:03 PM [1] (pid: 1704) graphql-language-service-usage-logs: Could not parse the Vue file at file:///workspace/components/JabrefLogo.vue to extract the graphql tags:
10/23/2022, 4:15:03 PM [1] (pid: 1704) graphql-language-service-usage-logs: Error: [@vue/compiler-sfc] SFC contains no <script> tags.
Expected Behavior
No error is logged, and the vue file is simply ignored.
Steps To Reproduce
Just have one vue file without a script block, then the above error is logged in the vscode console.
Example:
<template>
<div>
Hello!
</div>
</template>
Module pattern
- graphiql-umd
- graphiql-esm
- graphiql-commonjs
Environment
- GraphiQL Version:
- OS:
- Browser:
- Bundler:
- `react` Version:
- `graphql` Version:Anything else?
The error is thrown here: https://github.com/vuejs/core/blob/b0b74a160c08941fa9a7a5460f36a1f2fccbf423/packages/compiler-sfc/src/compileScript.ts#L195-L198 So I guess it should be sufficient to check if the sfc descriptor has a script or script setup field, before calling the compileScript method.
acao