Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

docs: updated nuxt bridge migration guide #7775

Merged
merged 7 commits into from Sep 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/content/bridge/1.overview.md
Expand Up @@ -149,6 +149,21 @@ Overwriting options such as `"compilerOptions.paths"` with your own configuratio
In case you need to extend options provided by `./.nuxt/tsconfig.json` further, you can use the `alias` property withing your `nuxt.config`. `nuxi` will pick them up and extend `./.nuxt/tsconfig.json` accordingly.
::

## Update Public Runtime Config References
danielroe marked this conversation as resolved.
Show resolved Hide resolved
Nuxt 3 approaches runtime configs differently than Nuxt 2. Now, all public runtime config properties are behind a property called `public`. If you use public runtime configs, you'll need to update your code.
Atinux marked this conversation as resolved.
Show resolved Hide resolved
danielroe marked this conversation as resolved.
Show resolved Hide resolved

danielroe marked this conversation as resolved.
Show resolved Hide resolved
```
Atinux marked this conversation as resolved.
Show resolved Hide resolved
// nuxt.config.js
publicRuntimeConfig: {
foo: 'bar'
}
danielroe marked this conversation as resolved.
Show resolved Hide resolved
```
``` diff
Atinux marked this conversation as resolved.
Show resolved Hide resolved
// MyWidget.vue
- <div>Foo: {{ $config.foo }}</div>
+ <div>Foo: {{ $config.public.foo }}</div>
danielroe marked this conversation as resolved.
Show resolved Hide resolved
```

## Migrate Composition API

If you were using `@vue/composition-api` or `@nuxtjs/composition-api`, please read the [composition api migration guide](/bridge/bridge-composition-api).
Expand Down