docs: update Nuxt 3 installation guide
This commit is contained in:
parent
b5a58f82b5
commit
ffb1bae1fe
|
|
@ -15,6 +15,7 @@ npx nuxi@latest init my-app
|
||||||
|
|
||||||
### Install TypeScript
|
### Install TypeScript
|
||||||
|
|
||||||
|
If you encounter the error `ERROR: Cannot read properties of undefined (reading 'sys') (x4)`, please proceed to install TypeScript as a dependency, as advised in this [issue](https://github.com/nuxt/nuxt/issues/20936)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install -D typescript
|
npm install -D typescript
|
||||||
|
|
@ -36,7 +37,7 @@ export default defineNuxtConfig({
|
||||||
// this is required else Nuxt will autoImport `.ts` file
|
// this is required else Nuxt will autoImport `.ts` file
|
||||||
extensions: ['.vue'],
|
extensions: ['.vue'],
|
||||||
// prefix for your components, eg: UiButton
|
// prefix for your components, eg: UiButton
|
||||||
prefix: 'UI'
|
prefix: 'Ui'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
@ -122,7 +123,7 @@ The command above will add the `Button` component to your project. Nuxt autoImpo
|
||||||
```vue {3}
|
```vue {3}
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<UIButton>Click me</UIButton>
|
<UiButton>Click me</UiButton>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user