This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/objects-router-commands
- Loading branch information
Showing
288 changed files
with
7,720 additions
and
5,061 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "🚀 Feature request" | ||
description: Suggest a feature that will improve Nuxt | ||
labels: ["pending triage"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thank you for taking the time to fill out this feature request! | ||
Please carefully read the contribution docs before suggesting a new feature | ||
👉 https://v3.nuxtjs.org/community/contribution/#creating-an-issue | ||
- type: textarea | ||
id: feature-description | ||
attributes: | ||
label: Describe the feature | ||
description: A clear and concise description of what you think would be a helpful addition to Nuxt, including the possible use cases and alternatives you have considered. If you have a working prototype or module that implements it, please include a link. | ||
placeholder: Feature description | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
id: additional-info | ||
attributes: | ||
label: Additional information | ||
description: Additional information that helps us decide how to proceed. | ||
options: | ||
- label: Would you be willing to help implement this feature? | ||
- label: Could this feature be implemented as a module? | ||
- type: checkboxes | ||
id: required-info | ||
attributes: | ||
label: Final checks | ||
description: Before submitting, please make sure you do the following | ||
options: | ||
- label: Read the [contribution guide](https://v3.nuxtjs.org/community/contribution). | ||
required: true | ||
- label: Check existing [discussions](https://github.com/nuxt/framework/discussions) and [issues](https://github.com/nuxt/framework/issues). | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ dist | |
.nuxt-* | ||
.output | ||
.gen | ||
nuxt.d.ts | ||
|
||
# Junit reports | ||
reports | ||
|
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# App Config | ||
|
||
::StabilityEdge | ||
:: | ||
|
||
Nuxt 3 provides an `app.config` config file to expose reactive configuration within your application with the ability to update it at runtime within lifecycle or using a nuxt plugin and editing it with HMR (hot-module-replacement). | ||
|
||
::alert{type=warning} | ||
Do not put any secret values inside `app.config` file. It is exposed to the user client bundle. | ||
:: | ||
|
||
## Defining App Config | ||
|
||
To expose config and environment variables to the rest of your app, you will need to define configuration in `app.config` file. | ||
|
||
**Example:** | ||
|
||
```ts [app.config.ts] | ||
export default defineAppConfig({ | ||
theme: { | ||
primaryColor: '#ababab' | ||
} | ||
}) | ||
``` | ||
|
||
When adding `theme` to the `app.config`, Nuxt uses Vite or Webpack to bundle the code. We can universally access `theme` in both server and browser using [useAppConfig](/api/composables/use-app-config) composable. | ||
|
||
```js | ||
const appConfig = useAppConfig() | ||
|
||
console.log(appConfig.theme) | ||
``` | ||
|
||
<!-- TODO: Document module author for extension --> | ||
|
||
### Manually Typing App Config | ||
|
||
Nuxt tries to automatically generate a typescript interface from provided app config. | ||
|
||
It is also possible to type app config manually: | ||
|
||
```ts [index.d.ts] | ||
declare module '@nuxt/schema' { | ||
interface AppConfig { | ||
/** Theme configuration */ | ||
theme: { | ||
/** Primary app color */ | ||
primaryColor: string | ||
} | ||
} | ||
} | ||
|
||
// It is always important to ensure you import/export something when augmenting a type | ||
export {} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.