Skip to content

Commit 8a01031

Browse files
committed
fix: Renaming config variable
1 parent c1fd282 commit 8a01031

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.playground/app.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default defineAppConfig({
2-
myLayer: {
3-
name: 'My amazing Nuxt layer (overwritten)'
4-
}
5-
})
2+
attributeContent: {
3+
name: "Nuxt Attribute Content (overwritten)",
4+
},
5+
});

app.config.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export default defineAppConfig({
2-
myLayer: {
3-
name: 'Hello from Nuxt layer'
4-
}
5-
})
2+
attributeContent: {
3+
name: "Nuxt Attribute Content",
4+
},
5+
});
66

7-
declare module '@nuxt/schema' {
7+
declare module "@nuxt/schema" {
88
interface AppConfigInput {
9-
myLayer?: {
9+
attributeContent?: {
1010
/** Project name */
11-
name?: string
12-
}
11+
name?: string;
12+
};
1313
}
1414
}

components/HelloWorld.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup lang="ts">
2-
const { myLayer } = useAppConfig()
2+
const { attributeContent } = useAppConfig();
33
</script>
44

55
<template>
66
<div>
77
<h1>Hello World!</h1>
8-
<pre>{{ myLayer }}</pre>
8+
<pre>{{ attributeContent }}</pre>
99
</div>
1010
</template>

0 commit comments

Comments
 (0)