Skip to content

Commit

Permalink
fix: fix plugin support (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaperStrike authored Aug 6, 2024
1 parent 20cf200 commit 1432fd3
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions packages/uni-app-types/src/volar-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
const nativeTags = ["block", "component", "template", "slot"];
export default [
// [2.0.14, ]
() => {
return {
version: 2,
resolveTemplateCompilerOptions(options: Record<string, any>) {
options.isNativeTag = (tag: string) => nativeTags.includes(tag);
return options;
},
};
export default () => ({
version: 2,
resolveTemplateCompilerOptions(options: Record<string, any>) {
options.isNativeTag = (tag: string) => nativeTags.includes(tag);
return options;
},
// [2.0.0, 2.0.13]
({ vueCompilerOptions }: Record<string, any>) => {
vueCompilerOptions.nativeTags = nativeTags;
return { version: 2 };
},
// [1.0.0, 1.8.27]
({ vueCompilerOptions }: Record<string, any>) => {
vueCompilerOptions.nativeTags = nativeTags;
vueCompilerOptions.experimentalRuntimeMode = "runtime-uni-app";
return { version: 1 };
},
];
});

0 comments on commit 1432fd3

Please sign in to comment.