Closed PaperStrike closed 3 months ago
The recent changes streamline the functionality of the volar-plugin.ts
file by condensing multiple exported functions into a single cohesive function. This new structure enhances clarity and maintainability while retaining the core functionality of resolving template compiler options. The adjustments support a simplified API, focusing specifically on modifying compiler options to include isNativeTag
, reflecting an efficient approach to configuration management.
File | Change Summary |
---|---|
.../volar-plugin.ts |
Refactored from multiple exported functions to a single function returning an object with a version and resolveTemplateCompilerOptions method. Simplified handling of nativeTags , improving code readability and maintainability. |
sequenceDiagram
participant User
participant VolarPlugin
participant CompilerOptions
User->>VolarPlugin: Initialize Plugin
VolarPlugin->>CompilerOptions: Set version = 2
VolarPlugin->>CompilerOptions: Add resolveTemplateCompilerOptions method
User->>CompilerOptions: Invoke resolveTemplateCompilerOptions
CompilerOptions->>User: Return modified options with isNativeTag
🐇 In the land of code, where functions reside,
A rabbit hopped in, with changes to guide.
From many to one, a simplification’s done,
Clarity blooms, like the morning sun.
WithisNativeTag
in the mix, oh what a delight,
Let's celebrate this refactor, all day and night! 🎉
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
不是 < 2.0.14 而是 < 2.0.22,2.0.22 引入了对于插件的破坏性更新
LGTM. Thank you!
可以给我一份 package.json,vite.config.ts,tsconfig.json吗,我看看是那里有问题
it works fine.
Description 描述
Volar v2.0.28 https://github.com/vuejs/language-tools/pull/4581
(PluginContext => PluginReturn)[]
形式的插件,PluginContext => (PluginReturn | PluginReturn[])
形式的插件正好 uni-types 新版本不再支持 volar <2.0.14,本 PR
PluginContext => PluginReturn
格式Linked Issues 关联的 Issues
Fixes #9 Fixes https://github.com/uni-helper/uni-app-types/issues/67
Additional context 额外上下文
Summary by CodeRabbit
New Features
isNativeTag
to enhance tag handling.Refactor