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.

use vetur for files with extention other than `.vue`

See original GitHub issue

I want to use vetur for files with extension .wpy instead of .vue. How to achieve this?

image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
lzl124631xcommented, Mar 6, 2021

I frankly don’t think it’s a good idea to limit Vetur to .vue files. There are variants of files using vue syntax but with other extention names. The one I’m using is .wpy (wepy) which uses vue syntax but is targeting WeChat App. Apparently there are other cases as well for example the one mentioned in https://github.com/vuejs/vetur/issues/1616. I don’t see https://github.com/vuejs/vetur/issues/2573#issuecomment-747184865 as related because that specific to file associations.

I was using Vetur for .wpy fine before 0.22.4 (including) https://github.com/vuejs/vetur/issues/1491. I don’t see benefit of limiting to .vue file.

1reaction
yoyo930021commented, Mar 12, 2021

@mashirozx @lzl124631x I can read Chinese, so I read all the framework documents.

Uni-app is based on Vue and explicitly conforms to Vue SFC spec in their document. I will consider accepting PR, but we don’t maintain different Vue parts. I will indicate this in the document and close the invalid issue.

wepy is using .wpy. See code sample in doc mpx is using .mpx. Example

In their document, it is only a framework and like Vue syntax. Ref: 类 Vue 开发风格 There is a big gap in many parts of the actual. I don’t think vetur can provide any practical help.

But just allowing Vetur to do syntax highlighting can benefit lots of those devs using those Vue variants. The investment for us would be minimal, just allowing them to configure the supported file extentions. And the return is way greater – all those devs will appreciate it.

If you only want syntax highlighting, you can copy vue syntax highlighting and open a new project. Here: https://github.com/vuejs/vetur/tree/master/syntaxes

Or set files.associations in vscode, syntax highlighting is work in vetur. Maybe try https://github.com/znck/vue-developer-experience/tree/main/extensions/vscode-vue

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ | Vetur - GitHub Pages
Vetur uses different version of TypeScript in .vue files to what I installed in node_modules . You can enable the Vetur: Use Workspace...
Read more >
Top 5 VS Code extensions for Vue developers for 2022
Like Volar, Vetur provides full language support, that although is more mature and feature-rich, is somewhat lacking in Vue 3 and TS support....
Read more >
Does VSCode support Vue without adding extensions?
itemName=octref.vetur. Short answer: No. Long answer: VSCode has been use its html extension for vue SFC. That works fine with html/css/js, ...
Read more >
Best VS Code Extensions for Vue That You Cannot Miss in 2022
With the popularity of the Vue 3 + TypeScript combination growing, Vue's official VS Code extension, Vetur, began to have issues. For example, ......
Read more >
Using Vue with TypeScript - Vue.js
Volar is the official VSCode extension that provides TypeScript support inside Vue SFCs, along with many other great features. TIP. Volar replaces Vetur,...
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