docs(schema): clarify aliases and use more obvious example path (#3143)

* docs(schema): clarify aliases and use more obvious example path

* docs: add note

* Update packages/schema/build.config.ts

Co-authored-by: pooya parsa <pyapar@gmail.com>

* docs: add more info about tsconfig

Co-authored-by: pooya parsa <pyapar@gmail.com>
This commit is contained in:
Daniel Roe 2022-02-09 21:27:35 +00:00 committed by GitHub
parent 977cbefd9c
commit 4b17f0cbaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,7 @@ export default defineBuildConfig({
name: 'config',
builder: 'untyped',
defaults: {
rootDir: '/project/'
rootDir: '/<rootDir>/'
}
},
'src/index'

View File

@ -506,8 +506,9 @@ export default {
* @note Within a webpack context (image sources, CSS - but not JavaScript) you _must_ access
* your alias by prefixing it with `~`.
*
* @note If you are using TypeScript and want to use the alias you define within
* your TypeScript files, you will need to add the aliases to your `paths` object within `tsconfig.json` .
* @note These aliases will be automatically added to the generated `.nuxt/tsconfig.json` so you can get full
* type support and path auto-complete. In case you need to extend options provided by `./.nuxt/tsconfig.json`
* further, make sure to add them here or within the `typescript.tsConfig` property in `nuxt.config`.
*
* @example
* ```js