docs(vite): frontmatter and description to documents (#14750)
This commit is contained in:
parent
5f03c2d4bf
commit
2876996a39
@ -6041,7 +6041,7 @@
|
|||||||
"name": "documents",
|
"name": "documents",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"name": "Overview",
|
"name": "Overview of the Nx Vite Plugin",
|
||||||
"path": "/packages/vite/documents/overview",
|
"path": "/packages/vite/documents/overview",
|
||||||
"id": "overview",
|
"id": "overview",
|
||||||
"isExternal": false,
|
"isExternal": false,
|
||||||
|
|||||||
@ -2636,8 +2636,8 @@
|
|||||||
"documents": {
|
"documents": {
|
||||||
"/packages/vite/documents/overview": {
|
"/packages/vite/documents/overview": {
|
||||||
"id": "overview",
|
"id": "overview",
|
||||||
"name": "Overview",
|
"name": "Overview of the Nx Vite Plugin",
|
||||||
"description": "The Nx Plugin for building and testing applications using Vite",
|
"description": "The Nx Plugin for Vite contains executors and generators that support building applications using Vite. This page also explains how to configure Vite on your Nx workspace.",
|
||||||
"file": "generated/packages/vite/documents/overview",
|
"file": "generated/packages/vite/documents/overview",
|
||||||
"itemList": [],
|
"itemList": [],
|
||||||
"isExternal": false,
|
"isExternal": false,
|
||||||
@ -2648,7 +2648,7 @@
|
|||||||
"/packages/vite/documents/set-up-vite-manually": {
|
"/packages/vite/documents/set-up-vite-manually": {
|
||||||
"id": "set-up-vite-manually",
|
"id": "set-up-vite-manually",
|
||||||
"name": "Manually set up your project to use Vite.js",
|
"name": "Manually set up your project to use Vite.js",
|
||||||
"description": "Manually set up your project to use Vite.js",
|
"description": "This guide explains how you can manually set up your project to use Vite.js in your Nx workspace.",
|
||||||
"file": "generated/packages/vite/documents/set-up-vite-manually",
|
"file": "generated/packages/vite/documents/set-up-vite-manually",
|
||||||
"itemList": [],
|
"itemList": [],
|
||||||
"isExternal": false,
|
"isExternal": false,
|
||||||
|
|||||||
@ -2607,8 +2607,8 @@
|
|||||||
"documents": [
|
"documents": [
|
||||||
{
|
{
|
||||||
"id": "overview",
|
"id": "overview",
|
||||||
"name": "Overview",
|
"name": "Overview of the Nx Vite Plugin",
|
||||||
"description": "The Nx Plugin for building and testing applications using Vite",
|
"description": "The Nx Plugin for Vite contains executors and generators that support building applications using Vite. This page also explains how to configure Vite on your Nx workspace.",
|
||||||
"file": "generated/packages/vite/documents/overview",
|
"file": "generated/packages/vite/documents/overview",
|
||||||
"itemList": [],
|
"itemList": [],
|
||||||
"isExternal": false,
|
"isExternal": false,
|
||||||
@ -2619,7 +2619,7 @@
|
|||||||
{
|
{
|
||||||
"id": "set-up-vite-manually",
|
"id": "set-up-vite-manually",
|
||||||
"name": "Manually set up your project to use Vite.js",
|
"name": "Manually set up your project to use Vite.js",
|
||||||
"description": "Manually set up your project to use Vite.js",
|
"description": "This guide explains how you can manually set up your project to use Vite.js in your Nx workspace.",
|
||||||
"file": "generated/packages/vite/documents/set-up-vite-manually",
|
"file": "generated/packages/vite/documents/set-up-vite-manually",
|
||||||
"itemList": [],
|
"itemList": [],
|
||||||
"isExternal": false,
|
"isExternal": false,
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Overview of the Nx Vite Plugin
|
||||||
|
description: The Nx Plugin for Vite contains executors and generators that support building applications using Vite. This page also explains how to configure Vite on your Nx workspace.
|
||||||
|
---
|
||||||
|
|
||||||
The Nx plugin for [Vite](https://vitejs.dev/) and [Vitest](https://vitest.dev/).
|
The Nx plugin for [Vite](https://vitejs.dev/) and [Vitest](https://vitest.dev/).
|
||||||
|
|
||||||
[Vite.js](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects.
|
[Vite.js](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects.
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Manually set up your project to use Vite.js
|
||||||
|
description: This guide explains how you can manually set up your project to use Vite.js in your Nx workspace.
|
||||||
|
---
|
||||||
|
|
||||||
# Manually set up your project to use Vite.js
|
# Manually set up your project to use Vite.js
|
||||||
|
|
||||||
{% callout type="note" title="Use our generator!" %}
|
{% callout type="note" title="Use our generator!" %}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"outputCapture": "direct-nodejs",
|
"outputCapture": "direct-nodejs",
|
||||||
"title": "Vite Prod Builder",
|
"title": "Vite Prod Builder",
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"description": "Build using Vite.",
|
"description": "Builds a Vite.js application for production.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"presets": [{ "name": "Default minimum setup", "keys": [] }],
|
"presets": [{ "name": "Default minimum setup", "keys": [] }],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -87,7 +87,7 @@
|
|||||||
},
|
},
|
||||||
"definitions": {},
|
"definitions": {},
|
||||||
"required": [],
|
"required": [],
|
||||||
"examplesFile": "`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nrwl/vite:build\",\n //...\n //...\n \"options\": {\n \"outputPath\": \"dist/apps/my-app\"\n },\n //...\n }\n },\n }\n}\n```\n\n```bash\nnx serve my-app\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Set a custom path for vite.config.ts\" %}\n\nNx will automatically look in the root of your application for a `vite.config.ts` (or a `vite.config.js`) file. If you want to use a different path, you can set it in your `project.json` file, in the `build` target options:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nrwl/vite:build\",\n //...\n \"options\": {\n \"outputPath\": \"dist/apps/my-app\",\n \"configFile\": \"apps/my-app/vite.config.other-path.ts\"\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\nor even\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nrwl/vite:build\",\n //...\n \"options\": {\n \"outputPath\": \"dist/apps/my-app\",\n \"configFile\": \"vite.config.base.ts\"\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n"
|
"examplesFile": "---\ntitle: Examples for the Vite builder executor\ndescription: This page contains examples for the Vite @nrwl/vite:build executor.\n---\n\n`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nrwl/vite:build\",\n //...\n //...\n \"options\": {\n \"outputPath\": \"dist/apps/my-app\"\n },\n //...\n }\n },\n }\n}\n```\n\n```bash\nnx serve my-app\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Set a custom path for vite.config.ts\" %}\n\nNx will automatically look in the root of your application for a `vite.config.ts` (or a `vite.config.js`) file. If you want to use a different path, you can set it in your `project.json` file, in the `build` target options:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nrwl/vite:build\",\n //...\n \"options\": {\n \"outputPath\": \"dist/apps/my-app\",\n \"configFile\": \"apps/my-app/vite.config.other-path.ts\"\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\nor even\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nrwl/vite:build\",\n //...\n \"options\": {\n \"outputPath\": \"dist/apps/my-app\",\n \"configFile\": \"vite.config.base.ts\"\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n"
|
||||||
},
|
},
|
||||||
"description": "Build with Vite.",
|
"description": "Build with Vite.",
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"outputCapture": "direct-nodejs",
|
"outputCapture": "direct-nodejs",
|
||||||
"title": "Vite Dev Server",
|
"title": "Vite Dev Server",
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"description": "Dev server for Vite.",
|
"description": "Starts a dev server using Vite.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"presets": [
|
"presets": [
|
||||||
{ "name": "Default minimum setup", "keys": ["buildTarget"] },
|
{ "name": "Default minimum setup", "keys": ["buildTarget"] },
|
||||||
@ -62,7 +62,7 @@
|
|||||||
},
|
},
|
||||||
"definitions": {},
|
"definitions": {},
|
||||||
"required": ["buildTarget"],
|
"required": ["buildTarget"],
|
||||||
"examplesFile": "`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nrwl/vite:dev-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n```bash\nnx serve my-app\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Set up a custom port\" %}\n\nYou can always set the port in your `vite.config.ts` file. However, you can also set it directly in your `project.json` file, in the `serve` target options:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nrwl/vite:dev-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n \"port\": 4200,\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Specify a proxyConfig\" %}\n\nYou can specify a proxy config by pointing to the path of your proxy configuration file:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nrwl/vite:dev-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n \"proxyConfig\": \"apps/my-app/proxy.conf.json\"\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n"
|
"examplesFile": "---\ntitle: Examples for the Vite dev server executor\ndescription: This page contains examples for the Vite @nrwl/vite:dev-server executor.\n---\n\n`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nrwl/vite:dev-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n```bash\nnx serve my-app\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Set up a custom port\" %}\n\nYou can always set the port in your `vite.config.ts` file. However, you can also set it directly in your `project.json` file, in the `serve` target options:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nrwl/vite:dev-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n \"port\": 4200,\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Specify a proxyConfig\" %}\n\nYou can specify a proxy config by pointing to the path of your proxy configuration file:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"serve\": {\n \"executor\": \"@nrwl/vite:dev-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n \"proxyConfig\": \"apps/my-app/proxy.conf.json\"\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n"
|
||||||
},
|
},
|
||||||
"description": "Vite dev server.",
|
"description": "Vite dev server.",
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
},
|
},
|
||||||
"definitions": {},
|
"definitions": {},
|
||||||
"required": ["buildTarget"],
|
"required": ["buildTarget"],
|
||||||
"examplesFile": "`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"preview\": {\n \"executor\": \"@nrwl/vite:preview-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n```bash\nnx preview my-app\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Set up a custom port\" %}\n\nYou can always set the port in your `vite.config.ts` file. However, you can also set it directly in your `project.json` file, in the `preview` target options:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"preview\": {\n \"executor\": \"@nrwl/vite:preview-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n \"port\": 4200,\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Specify a proxyConfig\" %}\n\nYou can specify a proxy config by pointing to the path of your proxy configuration file:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"preview\": {\n \"executor\": \"@nrwl/vite:preview-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n \"proxyConfig\": \"apps/my-app/proxy.conf.json\"\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n"
|
"examplesFile": "---\ntitle: Examples for the Vite preview server executor\ndescription: This page contains examples for the Vite @nrwl/vite:preview-server executor.\n---\n\n`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"preview\": {\n \"executor\": \"@nrwl/vite:preview-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n```bash\nnx preview my-app\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Set up a custom port\" %}\n\nYou can always set the port in your `vite.config.ts` file. However, you can also set it directly in your `project.json` file, in the `preview` target options:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"preview\": {\n \"executor\": \"@nrwl/vite:preview-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n \"port\": 4200,\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"Specify a proxyConfig\" %}\n\nYou can specify a proxy config by pointing to the path of your proxy configuration file:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"preview\": {\n \"executor\": \"@nrwl/vite:preview-server\",\n \"defaultConfiguration\": \"development\",\n \"options\": {\n \"buildTarget\": \"my-app:build\",\n \"proxyConfig\": \"apps/my-app/proxy.conf.json\"\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n"
|
||||||
},
|
},
|
||||||
"description": "Vite preview server",
|
"description": "Vite preview server",
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [],
|
"required": [],
|
||||||
"examplesFile": "`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"test\": {\n \"executor\": \"@nrwl/vite:test\",\n //...\n //...\n \"options\": {\n \"config\": \"apps/my-app/vite.config.ts\"\n }\n //...\n }\n }\n}\n```\n\n```bash\nnx test my-app\n```\n\n## Examples\n\n{% tabs %}\n\n{% tab label=\"Running in watch mode\" %}\nTo run testing in watch mode, you can create a new configuration within your test target, and have watch set to true. For example:\n\n```json\n\"my-app\": {\n \"targets\": {\n //...\n \"test\": {\n \"executor\": \"@nrwl/vite:test\",\n //...\n //...\n \"options\": {\n \"config\": \"apps/my-app/vite.config.ts\"\n },\n \"configurations\": {\n \"watch\": {\n \"watch\": true\n }\n }\n }\n }\n}\n```\n\nAnd then run `nx run my-app:test:watch`.\n\nAlternatively, you can just run the default test target with the `--watch` flag preset, like so:\n\n```bash\nnx run my-app:test --watch\n```\n\n{% /tab %}\n{% tab label=\"Updating snapshots\" %}\nWhenever a test fails because of an outdated snapshot, you can tell vitest to update them with the following:\n\n```bash\nnx run my-app:test -u\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
|
"examplesFile": "---\ntitle: Examples for the Vitest executor\ndescription: This page contains examples for the Vitest @nrwl/vite:test executor.\n---\n\n`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"test\": {\n \"executor\": \"@nrwl/vite:test\",\n //...\n //...\n \"options\": {\n \"config\": \"apps/my-app/vite.config.ts\"\n }\n //...\n }\n }\n}\n```\n\n```bash\nnx test my-app\n```\n\n## Examples\n\n{% tabs %}\n\n{% tab label=\"Running in watch mode\" %}\nTo run testing in watch mode, you can create a new configuration within your test target, and have watch set to true. For example:\n\n```json\n\"my-app\": {\n \"targets\": {\n //...\n \"test\": {\n \"executor\": \"@nrwl/vite:test\",\n //...\n //...\n \"options\": {\n \"config\": \"apps/my-app/vite.config.ts\"\n },\n \"configurations\": {\n \"watch\": {\n \"watch\": true\n }\n }\n }\n }\n}\n```\n\nAnd then run `nx run my-app:test:watch`.\n\nAlternatively, you can just run the default test target with the `--watch` flag preset, like so:\n\n```bash\nnx run my-app:test --watch\n```\n\n{% /tab %}\n{% tab label=\"Updating snapshots\" %}\nWhenever a test fails because of an outdated snapshot, you can tell vitest to update them with the following:\n\n```bash\nnx run my-app:test -u\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
|
||||||
"presets": []
|
"presets": []
|
||||||
},
|
},
|
||||||
"description": "Test with Vitest",
|
"description": "Test with Vitest",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@
|
|||||||
"default": false
|
"default": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"examplesFile": "This is a generator will initialize Vite.js in your workspace. It will install all the necessary dependencies. You can read more about how this generator works, in the [Vite package overview page](/packages/vite).\n\n{% callout type=\"note\" title=\"string\" %}\nYou don't need to use this generator on its own.\n{% /callout %}\n\nThis generator will be called automatically when you are either converting an existing React or Web app to use Vite, using the [`@nrwl/vite:configuration` generator](/packages/vite/generators/configuration), or when you are creating a new React or Web app using the [`@nrwl/react:app`](/packages/react/generators/application) or [`@nrwl/web:app`](/packages/web/generators/application) generators, if you choose `vite` as the `bundler`.\n\nIf you need to for some reason, you can use it on its own like this:\n\n```bash\nnx g @nrwl/vite:init\n```\n\n## Examples\n\n### Install all the necessary dependencies for Vite and the React plugin\n\n```bash\nnx g @nrwl/vite:init --uiFramework=react\n```\n\n### Install all the necessary dependencies for Vite\n\n```bash\nnx g @nrwl/vite:init --uiFramework=none\n```\n",
|
"examplesFile": "---\ntitle: Examples for the Vite init generator\ndescription: This page contains examples for the Vite @nrwl/vite:init generator, which helps you initialize vite in your Nx workspace, by installing the necessary dependencies.\n---\n\nThis is a generator will initialize Vite.js in your workspace. It will install all the necessary dependencies. You can read more about how this generator works, in the [Vite package overview page](/packages/vite).\n\n{% callout type=\"note\" title=\"string\" %}\nYou don't need to use this generator on its own.\n{% /callout %}\n\nThis generator will be called automatically when you are either converting an existing React or Web app to use Vite, using the [`@nrwl/vite:configuration` generator](/packages/vite/generators/configuration), or when you are creating a new React or Web app using the [`@nrwl/react:app`](/packages/react/generators/application) or [`@nrwl/web:app`](/packages/web/generators/application) generators, if you choose `vite` as the `bundler`.\n\nIf you need to for some reason, you can use it on its own like this:\n\n```bash\nnx g @nrwl/vite:init\n```\n\n## Examples\n\n### Install all the necessary dependencies for Vite and the React plugin\n\n```bash\nnx g @nrwl/vite:init --uiFramework=react\n```\n\n### Install all the necessary dependencies for Vite\n\n```bash\nnx g @nrwl/vite:init --uiFramework=none\n```\n",
|
||||||
"presets": []
|
"presets": []
|
||||||
},
|
},
|
||||||
"description": "Initialize Vite in the workspace.",
|
"description": "Initialize Vite in the workspace.",
|
||||||
|
|||||||
@ -5,9 +5,9 @@
|
|||||||
"$schema": "http://json-schema.org/schema",
|
"$schema": "http://json-schema.org/schema",
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"$id": "Vitest",
|
"$id": "Vitest",
|
||||||
"title": "",
|
"title": "Vitest",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Generate a vitest setup for a project.",
|
"description": "Generate a Vitest setup for a project.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"project": {
|
"project": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -18,17 +18,17 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["react", "none"],
|
"enum": ["react", "none"],
|
||||||
"default": "none",
|
"default": "none",
|
||||||
"description": "UI framework to use with vitest"
|
"description": "UI framework to use with vitest."
|
||||||
},
|
},
|
||||||
"inSourceTests": {
|
"inSourceTests": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
"description": "Do not generate separate spec files and set up in-source testing"
|
"description": "Do not generate separate spec files and set up in-source testing."
|
||||||
},
|
},
|
||||||
"skipViteConfig": {
|
"skipViteConfig": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
"description": "Skip generating a vite config file"
|
"description": "Skip generating a vite config file."
|
||||||
},
|
},
|
||||||
"coverageProvider": {
|
"coverageProvider": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@ -1589,15 +1589,16 @@
|
|||||||
"description": "Vite package.",
|
"description": "Vite package.",
|
||||||
"itemList": [
|
"itemList": [
|
||||||
{
|
{
|
||||||
"name": "Overview",
|
|
||||||
"id": "overview",
|
"id": "overview",
|
||||||
"path": "/packages/vite",
|
"path": "/packages/vite",
|
||||||
|
"name": "Overview of the Nx Vite Plugin",
|
||||||
|
"description": "The Nx Plugin for Vite contains executors and generators that support building applications using Vite. This page also explains how to configure Vite on your Nx workspace.",
|
||||||
"file": "shared/packages/vite/vite-plugin"
|
"file": "shared/packages/vite/vite-plugin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Manually set up your project to use Vite.js",
|
|
||||||
"id": "set-up-vite-manually",
|
"id": "set-up-vite-manually",
|
||||||
"description": "Manually set up your project to use Vite.js",
|
"name": "Manually set up your project to use Vite.js",
|
||||||
|
"description": "This guide explains how you can manually set up your project to use Vite.js in your Nx workspace.",
|
||||||
"file": "shared/packages/vite/set-up-vite-manually"
|
"file": "shared/packages/vite/set-up-vite-manually"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Manually set up your project to use Vite.js
|
||||||
|
description: This guide explains how you can manually set up your project to use Vite.js in your Nx workspace.
|
||||||
|
---
|
||||||
|
|
||||||
# Manually set up your project to use Vite.js
|
# Manually set up your project to use Vite.js
|
||||||
|
|
||||||
{% callout type="note" title="Use our generator!" %}
|
{% callout type="note" title="Use our generator!" %}
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Overview of the Nx Vite Plugin
|
||||||
|
description: The Nx Plugin for Vite contains executors and generators that support building applications using Vite. This page also explains how to configure Vite on your Nx workspace.
|
||||||
|
---
|
||||||
|
|
||||||
The Nx plugin for [Vite](https://vitejs.dev/) and [Vitest](https://vitest.dev/).
|
The Nx plugin for [Vite](https://vitejs.dev/) and [Vitest](https://vitest.dev/).
|
||||||
|
|
||||||
[Vite.js](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects.
|
[Vite.js](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects.
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Examples for the Vite builder executor
|
||||||
|
description: This page contains examples for the Vite @nrwl/vite:build executor.
|
||||||
|
---
|
||||||
|
|
||||||
`project.json`:
|
`project.json`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Examples for the Vite configuration generator
|
||||||
|
description: This page contains examples for the Vite @nrwl/vite:configuration generator, which helps you set up Vite on your Nx workspace, or convert an existing project to use Vite.
|
||||||
|
---
|
||||||
|
|
||||||
This generator is used for converting an existing React or Web project to use [Vite.js](https://vitejs.dev/) and the [@nrwl/vite executors](/packages/vite#executors).
|
This generator is used for converting an existing React or Web project to use [Vite.js](https://vitejs.dev/) and the [@nrwl/vite executors](/packages/vite#executors).
|
||||||
|
|
||||||
It will change the `build` and `serve` targets to use the `@nrwl/vite` executors for serving and building the application. If you choose so, it will also change your `test` target to use the `@nrwl/vite:test` executor. It will create a `vite.config.ts` file at the root of your project with the correct settings, or if there's already a `vite.config.ts` file, it will modify it to include the correct settings.
|
It will change the `build` and `serve` targets to use the `@nrwl/vite` executors for serving and building the application. If you choose so, it will also change your `test` target to use the `@nrwl/vite:test` executor. It will create a `vite.config.ts` file at the root of your project with the correct settings, or if there's already a `vite.config.ts` file, it will modify it to include the correct settings.
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Examples for the Vite dev server executor
|
||||||
|
description: This page contains examples for the Vite @nrwl/vite:dev-server executor.
|
||||||
|
---
|
||||||
|
|
||||||
`project.json`:
|
`project.json`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Examples for the Vite init generator
|
||||||
|
description: This page contains examples for the Vite @nrwl/vite:init generator, which helps you initialize vite in your Nx workspace, by installing the necessary dependencies.
|
||||||
|
---
|
||||||
|
|
||||||
This is a generator will initialize Vite.js in your workspace. It will install all the necessary dependencies. You can read more about how this generator works, in the [Vite package overview page](/packages/vite).
|
This is a generator will initialize Vite.js in your workspace. It will install all the necessary dependencies. You can read more about how this generator works, in the [Vite package overview page](/packages/vite).
|
||||||
|
|
||||||
{% callout type="note" title="string" %}
|
{% callout type="note" title="string" %}
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Examples for the Vite preview server executor
|
||||||
|
description: This page contains examples for the Vite @nrwl/vite:preview-server executor.
|
||||||
|
---
|
||||||
|
|
||||||
`project.json`:
|
`project.json`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
title: Examples for the Vitest executor
|
||||||
|
description: This page contains examples for the Vitest @nrwl/vite:test executor.
|
||||||
|
---
|
||||||
|
|
||||||
`project.json`:
|
`project.json`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"outputCapture": "direct-nodejs",
|
"outputCapture": "direct-nodejs",
|
||||||
"title": "Vite Prod Builder",
|
"title": "Vite Prod Builder",
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"description": "Build using Vite.",
|
"description": "Builds a Vite.js application for production.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"presets": [
|
"presets": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"outputCapture": "direct-nodejs",
|
"outputCapture": "direct-nodejs",
|
||||||
"title": "Vite Dev Server",
|
"title": "Vite Dev Server",
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"description": "Dev server for Vite.",
|
"description": "Starts a dev server using Vite.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"presets": [
|
"presets": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
"$schema": "http://json-schema.org/schema",
|
"$schema": "http://json-schema.org/schema",
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"$id": "Vitest",
|
"$id": "Vitest",
|
||||||
"title": "",
|
"title": "Vitest",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Generate a vitest setup for a project.",
|
"description": "Generate a Vitest setup for a project.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"project": {
|
"project": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -15,17 +15,17 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["react", "none"],
|
"enum": ["react", "none"],
|
||||||
"default": "none",
|
"default": "none",
|
||||||
"description": "UI framework to use with vitest"
|
"description": "UI framework to use with vitest."
|
||||||
},
|
},
|
||||||
"inSourceTests": {
|
"inSourceTests": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
"description": "Do not generate separate spec files and set up in-source testing"
|
"description": "Do not generate separate spec files and set up in-source testing."
|
||||||
},
|
},
|
||||||
"skipViteConfig": {
|
"skipViteConfig": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
"description": "Skip generating a vite config file"
|
"description": "Skip generating a vite config file."
|
||||||
},
|
},
|
||||||
"coverageProvider": {
|
"coverageProvider": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user