question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug with files.associations config and SFC script tags

See original GitHub issue

Similar to an older issue which was complaining about <template> tags in a SFC under a file association.

https://github.com/vuejs/vetur/issues/1480

Info

  • Platform: Linux
  • Vetur version: 0.31.3
  • VS Code version: 1.52.0

Problem

    "files.associations": {
        "*.foo": "vue"
    },
<script>
</script>
<template>
</template>

Fails with: "Cannot find name 'script'"

Whereas the following succeeds:

<script lang="js">
</script>
<template>
</template>

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
yoyo930021commented, Dec 17, 2020

We don’t support files.associations. We have a lot of judgment based on file names. Vetur provide TypeScript/JavaScript feature with TypeScript language service. TypeScript language service don’t support custom filename extension.

If you want to support this option, you need a lot of energy. I don’t think we have enough development energy to do this.

0reactions
mryellowcommented, Dec 21, 2020

The more I understand how this handles extensions and custom blocks, the more I’m convinced this is a bug.

  • *.foo will be scanned and <script lang="js"> will correctly be parsed.
  • *.foo will be scanned and <script> will not be found. (Or rather it will be found but Vetur will complain about not knowing “script” blocks)

If it can find one. Why does it not find the other?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug with files.associations config and SFC script tags ... - Issuehunt
We don't support files.associations . We have a lot of judgment based on file names. Vetur provide TypeScript/JavaScript feature with TypeScript language ...
Read more >
use files.associations config, Vetur version >= 0.22.5 has error
I'm convinced this is a bug. In any file type associated with Vue. A <script> tag should be interpreted as Javascript unless otherwise...
Read more >
This file does not have a program associated with it ... - TechNet
When i open any app that has to do with a setting ex. "Display Settings", it just says "ms-settting:display This file does not...
Read more >
Windows 10 bug corrupts your hard drive on seeing this file's ...
In multiple tests by BleepingComputer, this one-liner can be delivered hidden inside a Windows shortcut file, a ZIP archive, batch files, ...
Read more >
MS Edge browser hijacking PDF file association - Super User
in upper right Settings Cookies and site permissions PDF documents Set Always open PDF files externally to ON.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found