x
This commit is contained in:
9
packages/2-nuxtConfig/.gitignore
vendored
Normal file
9
packages/2-nuxtConfig/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
node_modules
|
||||
*.log*
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
.output
|
||||
.env
|
||||
dist
|
||||
.DS_Store
|
1
packages/2-nuxtConfig/.npmrc
Normal file
1
packages/2-nuxtConfig/.npmrc
Normal file
@@ -0,0 +1 @@
|
||||
shamefully-hoist=true
|
3
packages/2-nuxtConfig/README.md
Normal file
3
packages/2-nuxtConfig/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Nuxt Config
|
||||
|
||||
|
11
packages/2-nuxtConfig/app.vue
Normal file
11
packages/2-nuxtConfig/app.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
{{ config }}
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
let config = useRuntimeConfig();
|
||||
onMounted(() => {
|
||||
console.log(config);
|
||||
});
|
||||
</script>
|
9
packages/2-nuxtConfig/nuxt.config.ts
Normal file
9
packages/2-nuxtConfig/nuxt.config.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
token: "123",
|
||||
footer: "copyright2023"
|
||||
},
|
||||
},
|
||||
})
|
15
packages/2-nuxtConfig/package.json
Normal file
15
packages/2-nuxtConfig/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18",
|
||||
"nuxt": "^3.4.3"
|
||||
}
|
||||
}
|
BIN
packages/2-nuxtConfig/public/favicon.ico
Normal file
BIN
packages/2-nuxtConfig/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
4
packages/2-nuxtConfig/tsconfig.json
Normal file
4
packages/2-nuxtConfig/tsconfig.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|
Reference in New Issue
Block a user