Skip to content

Commit f6ed331

Browse files
committed
fix: add types to nuxt import
1 parent 6e985d7 commit f6ed331

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/nuxt.ts

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import unplugin from ".";
44
export default function (this: any, options: Options = {}, nuxt: any) {
55
const nuxtApp = this?.nuxt || nuxt;
66

7+
nuxtApp.options.typescript ||= {};
8+
nuxtApp.options.typescript.tsConfig ||= {};
9+
nuxtApp.options.typescript.tsConfig.compilerOptions ||= {};
10+
nuxtApp.options.typescript.tsConfig.compilerOptions.types ||= [];
11+
nuxtApp.options.typescript.tsConfig.compilerOptions.types.push("unplugin-yaml/types");
12+
713
// install webpack plugin
814
nuxtApp.hook("webpack:config", (configs: any[]) => {
915
configs.forEach((config) => {

0 commit comments

Comments
 (0)