You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to get the typescript language service and the extended full service, the vue component is written in a separate file type. It is cumbersome to specify the name of src every time. Renaming files can also cause cumbersome.
Allow vue-loader to specify the default src rule. For example
When the script does not exist in the .vue file, it searches for the existence of the file according to the rule. If it exists, it is used. If it does not exist, it is not used.
Uh oh!
There was an error while loading. Please reload this page.
What problem does this feature solve?
In order to get the typescript language service and the extended full service, the vue component is written in a separate file type. It is cumbersome to specify the name of
src
every time. Renaming files can also cause cumbersome.Allow vue-loader to specify the default src rule. For example
When the script does not exist in the .vue file, it searches for the existence of the file according to the rule. If it exists, it is used. If it does not exist, it is not used.
为了获得 typescript 的语言服务和扩展的完整服务,采用文件类型分离的方式编写 vue 组件。每次都需要指定
src
的名称是一件很繁琐的事情。重命名文件也会带来麻烦。允许 vue-loader 指定默认的 src 规则。例如
当 .vue 文件不存在 script 时,按规则查找文件是否存在,若存在则使用,不存在则不使用。
What does the proposed API look like?
Options
defaultTemplateSrc
type: string | string[] | false
default: false
defaultScriptSrc
type: string | string[] | false
default: false
defaultStyleSrc
type: string | string[] | false
default: false
Use
[name]
to indicate the file nameexample:
Related issues
#1281
vuejs/vetur#188 (comment)
vuejs/vetur#188 (comment)
The text was updated successfully, but these errors were encountered: