From 4b17f0cbaf6a8164a7105a1dec85b6896ffad652 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 9 Feb 2022 21:27:35 +0000 Subject: [PATCH] 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 * docs: add more info about tsconfig Co-authored-by: pooya parsa --- packages/schema/build.config.ts | 2 +- packages/schema/src/config/_common.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/schema/build.config.ts b/packages/schema/build.config.ts index f1f4910add..15d38f979e 100644 --- a/packages/schema/build.config.ts +++ b/packages/schema/build.config.ts @@ -9,7 +9,7 @@ export default defineBuildConfig({ name: 'config', builder: 'untyped', defaults: { - rootDir: '/project/' + rootDir: '//' } }, 'src/index' diff --git a/packages/schema/src/config/_common.ts b/packages/schema/src/config/_common.ts index dbaec827e3..97f83aeb8b 100644 --- a/packages/schema/src/config/_common.ts +++ b/packages/schema/src/config/_common.ts @@ -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