docs(core): move package documents into its own folder (#13935)
Signed-off-by: Ben <3447705+bcabanes@users.noreply.github.com>
This commit is contained in:
parent
7beee3c103
commit
ae8e0280fd
@ -26,7 +26,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/angular/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/angular-plugin"
|
||||
"originalFilePath": "shared/packages/angular/angular-plugin"
|
||||
},
|
||||
"/packages/angular/documents/angular-nx-version-matrix": {
|
||||
"id": "angular-nx-version-matrix",
|
||||
@ -37,7 +37,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/angular/documents/angular-nx-version-matrix",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/angular-nx-version-matrix"
|
||||
"originalFilePath": "shared/packages/angular/angular-nx-version-matrix"
|
||||
}
|
||||
},
|
||||
"root": "/packages/angular",
|
||||
@ -468,7 +468,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/cypress/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/cypress-plugin"
|
||||
"originalFilePath": "shared/packages/cypress/cypress-plugin"
|
||||
},
|
||||
"/packages/cypress/documents/cypress-component-testing": {
|
||||
"id": "cypress-component-testing",
|
||||
@ -479,7 +479,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/cypress/documents/cypress-component-testing",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/cypress/cypress-component-testing"
|
||||
"originalFilePath": "shared/packages/cypress/cypress-component-testing"
|
||||
},
|
||||
"/packages/cypress/documents/v11-migration-guide": {
|
||||
"id": "v11-migration-guide",
|
||||
@ -490,7 +490,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/cypress/documents/v11-migration-guide",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/cypress/cypress-v11-migration"
|
||||
"originalFilePath": "shared/packages/cypress/cypress-v11-migration"
|
||||
}
|
||||
},
|
||||
"root": "/packages/cypress",
|
||||
@ -561,7 +561,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/detox/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/detox-plugin"
|
||||
"originalFilePath": "shared/packages/detox/detox-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/detox",
|
||||
@ -658,7 +658,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/esbuild/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/esbuild-plugin"
|
||||
"originalFilePath": "shared/packages/esbuild/esbuild-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/esbuild",
|
||||
@ -711,7 +711,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/eslint-plugin-nx/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/eslint-plugin-nx"
|
||||
"originalFilePath": "shared/packages/linter/eslint-plugin-nx"
|
||||
}
|
||||
},
|
||||
"root": "/packages/eslint-plugin-nx",
|
||||
@ -947,7 +947,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/express/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/express-plugin"
|
||||
"originalFilePath": "shared/packages/express/express-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/express",
|
||||
@ -990,7 +990,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/jest/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/jest-plugin"
|
||||
"originalFilePath": "shared/packages/jest/jest-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/jest",
|
||||
@ -1043,7 +1043,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/js/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/js-plugin"
|
||||
"originalFilePath": "shared/packages/js/js-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/js",
|
||||
@ -1123,7 +1123,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/linter/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/linter-plugin"
|
||||
"originalFilePath": "shared/packages/linter/linter-plugin"
|
||||
},
|
||||
"/packages/linter/documents/eslint-plugin-nx": {
|
||||
"id": "eslint-plugin-nx",
|
||||
@ -1134,7 +1134,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/linter/documents/eslint-plugin-nx",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/eslint-plugin-nx"
|
||||
"originalFilePath": "shared/packages/linter/eslint-plugin-nx"
|
||||
}
|
||||
},
|
||||
"root": "/packages/linter",
|
||||
@ -1199,7 +1199,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/nest/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/nest-plugin"
|
||||
"originalFilePath": "shared/packages/nest/nest-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/nest",
|
||||
@ -1395,7 +1395,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/next/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/next-plugin"
|
||||
"originalFilePath": "shared/packages/next/next-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/next",
|
||||
@ -1502,7 +1502,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/node/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/node-plugin"
|
||||
"originalFilePath": "shared/packages/node/node-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/node",
|
||||
@ -1878,7 +1878,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/nx-plugin/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/nx-plugin"
|
||||
"originalFilePath": "shared/packages/nx-plugin/nx-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/nx-plugin",
|
||||
@ -1967,7 +1967,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/react/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/react-plugin"
|
||||
"originalFilePath": "shared/packages/react/react-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/react",
|
||||
@ -2155,7 +2155,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/react-native/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/react-native-plugin"
|
||||
"originalFilePath": "shared/packages/react-native/react-native-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/react-native",
|
||||
@ -2366,7 +2366,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/plugin-overview"
|
||||
"originalFilePath": "shared/packages/storybook/plugin-overview"
|
||||
},
|
||||
"/packages/storybook/documents/overview-react": {
|
||||
"id": "overview-react",
|
||||
@ -2377,7 +2377,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/overview-react",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/plugin-react"
|
||||
"originalFilePath": "shared/packages/storybook/plugin-react"
|
||||
},
|
||||
"/packages/storybook/documents/overview-angular": {
|
||||
"id": "overview-angular",
|
||||
@ -2388,7 +2388,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/overview-angular",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/plugin-angular"
|
||||
"originalFilePath": "shared/packages/storybook/plugin-angular"
|
||||
},
|
||||
"/packages/storybook/documents/best-practices": {
|
||||
"id": "best-practices",
|
||||
@ -2399,7 +2399,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/best-practices",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/best-practices"
|
||||
"originalFilePath": "shared/packages/storybook/best-practices"
|
||||
},
|
||||
"/packages/storybook/documents/storybook-composition-setup": {
|
||||
"id": "storybook-composition-setup",
|
||||
@ -2410,7 +2410,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/storybook-composition-setup",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/storybook-composition-setup"
|
||||
"originalFilePath": "shared/packages/storybook/storybook-composition-setup"
|
||||
},
|
||||
"/packages/storybook/documents/angular-storybook-compodoc": {
|
||||
"id": "angular-storybook-compodoc",
|
||||
@ -2421,7 +2421,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/angular-storybook-compodoc",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/angular-storybook-compodoc"
|
||||
"originalFilePath": "shared/packages/storybook/angular-storybook-compodoc"
|
||||
},
|
||||
"/packages/storybook/documents/angular-storybook-targets": {
|
||||
"id": "angular-storybook-targets",
|
||||
@ -2432,7 +2432,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/angular-storybook-targets",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/angular-storybook-targets"
|
||||
"originalFilePath": "shared/packages/storybook/angular-storybook-targets"
|
||||
},
|
||||
"/packages/storybook/documents/angular-configuring-styles": {
|
||||
"id": "angular-configuring-styles",
|
||||
@ -2443,7 +2443,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/angular-configuring-styles",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/angular-configuring-styles"
|
||||
"originalFilePath": "shared/packages/storybook/angular-configuring-styles"
|
||||
},
|
||||
"/packages/storybook/documents/angular-browser-target": {
|
||||
"id": "angular-browser-target",
|
||||
@ -2454,7 +2454,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/angular-browser-target",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/angular-browser-target"
|
||||
"originalFilePath": "shared/packages/storybook/angular-browser-target"
|
||||
},
|
||||
"/packages/storybook/documents/migrate-webpack-final-angular": {
|
||||
"id": "migrate-webpack-final-angular",
|
||||
@ -2465,7 +2465,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/migrate-webpack-final-angular",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/migrate-webpack-final-angular"
|
||||
"originalFilePath": "shared/packages/storybook/migrate-webpack-final-angular"
|
||||
},
|
||||
"/packages/storybook/documents/upgrade-storybook-v6-angular": {
|
||||
"id": "upgrade-storybook-v6-angular",
|
||||
@ -2476,7 +2476,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/upgrade-storybook-v6-angular",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/storybook-v6-angular"
|
||||
"originalFilePath": "shared/packages/storybook/storybook-v6-angular"
|
||||
},
|
||||
"/packages/storybook/documents/migrate-webpack-final-react": {
|
||||
"id": "migrate-webpack-final-react",
|
||||
@ -2487,7 +2487,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/migrate-webpack-final-react",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/migrate-webpack-final-react"
|
||||
"originalFilePath": "shared/packages/storybook/migrate-webpack-final-react"
|
||||
},
|
||||
"/packages/storybook/documents/upgrade-storybook-v6-react": {
|
||||
"id": "upgrade-storybook-v6-react",
|
||||
@ -2498,7 +2498,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/storybook/documents/upgrade-storybook-v6-react",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/storybook-v6-react"
|
||||
"originalFilePath": "shared/packages/storybook/storybook-v6-react"
|
||||
}
|
||||
},
|
||||
"root": "/packages/storybook",
|
||||
@ -2590,7 +2590,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/vite/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/vite-plugin"
|
||||
"originalFilePath": "shared/packages/vite/vite-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/vite",
|
||||
@ -2670,7 +2670,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/web/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/web-plugin"
|
||||
"originalFilePath": "shared/packages/web/web-plugin"
|
||||
}
|
||||
},
|
||||
"root": "/packages/web",
|
||||
@ -2809,7 +2809,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/workspace/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/workspace-plugin"
|
||||
"originalFilePath": "shared/packages/workspace/workspace-plugin"
|
||||
},
|
||||
"/packages/workspace/documents/nx-nodejs-typescript-version-matrix": {
|
||||
"id": "nx-nodejs-typescript-version-matrix",
|
||||
@ -2820,7 +2820,7 @@
|
||||
"isExternal": false,
|
||||
"path": "/packages/workspace/documents/nx-nodejs-typescript-version-matrix",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/nx-compatibility-matrix"
|
||||
"originalFilePath": "shared/packages/workspace/nx-compatibility-matrix"
|
||||
}
|
||||
},
|
||||
"root": "/packages/workspace",
|
||||
|
||||
@ -168,7 +168,7 @@ If you are using React, you need to use the [`@vitejs/plugin-react` plugin](http
|
||||
Add a `vite.config.ts` file to the root of your app. If you are not using React, you can skip adding the `react` plugin, of course.
|
||||
|
||||
```ts
|
||||
// eg. apps/my-app/vite.config.ts
|
||||
// e.g. apps/my-app/vite.config.ts
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import ViteTsConfigPathsPlugin from 'vite-tsconfig-paths';
|
||||
@ -193,7 +193,7 @@ In that config file, you can configure Vite.js as you would normally do. For mor
|
||||
|
||||
You can create a `vite.config.ts` file to the root of your workspace, as well as at the root of each of your applications. This file is used to configure Vite. You can read more about the configuration options in the [Vite documentation](https://vitejs.dev/config/).
|
||||
|
||||
The root `vite.config.ts` file can be used for all applications, and you can place in there general configurations that would apply for all your apps using Vite in your workspace. The application-specific `vite.config.ts` files can be used to override the root configuration, or, for example, import framework-specific plugins (eg. the `'@vitejs/plugin-react'` for React apps). The application-specific configuration files extend (using [`mergeConfig`](https://vitejs.dev/guide/api-javascript.html#mergeconfig)) the root configuration file. You can adjust this behavior to your needs.
|
||||
The root `vite.config.ts` file can be used for all applications, and you can place in here general configurations that would apply for all your apps using Vite in your workspace. The application-specific `vite.config.ts` files can be used to override the root configuration, or, for example, import framework-specific plugins (e.g. the `'@vitejs/plugin-react'` for React apps). The application-specific configuration files extend (using [`mergeConfig`](https://vitejs.dev/guide/api-javascript.html#mergeconfig)) the root configuration file. You can adjust this behavior to your needs.
|
||||
|
||||
So, if you are using a root `vite.config.ts` file, you should adjust your code as follows:
|
||||
|
||||
@ -209,7 +209,7 @@ export default defineConfig({
|
||||
and then in your app's `vite.config.ts` file:
|
||||
|
||||
```ts
|
||||
// eg. apps/my-app/vite.config.ts
|
||||
// e.g. apps/my-app/vite.config.ts
|
||||
import { mergeConfig } from 'vite';
|
||||
import baseConfig from '../../vite.config';
|
||||
import react from '@vitejs/plugin-react';
|
||||
@ -227,7 +227,7 @@ export default mergeConfig(baseConfig, {
|
||||
|
||||
### 3. Move `index.html` and point it to your app's entrypoint
|
||||
|
||||
First of all, move your `index.html` file to the root of your app (eg. from `apps/my-app/src/index.html` to `apps/my-app/index.html`).
|
||||
First of all, move your `index.html` file to the root of your app (e.g. from `apps/my-app/src/index.html` to `apps/my-app/index.html`).
|
||||
|
||||
Then, add a module `script` tag pointing to the `main.tsx` (or `main.ts`) file of your app:
|
||||
|
||||
@ -268,7 +268,7 @@ You can use the `public` folder to store static **assets**, such as images, font
|
||||
|
||||
### 5. Adjust your app's tsconfig.json
|
||||
|
||||
Change your app's `tsconfig.json` (eg. `apps/my-app/tsconfig.json`) `compilerOptions` to the following:
|
||||
Change your app's `tsconfig.json` (e.g. `apps/my-app/tsconfig.json`) `compilerOptions` to the following:
|
||||
|
||||
#### For React apps
|
||||
|
||||
|
||||
@ -1466,12 +1466,12 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/workspace",
|
||||
"file": "shared/workspace-plugin"
|
||||
"file": "shared/packages/workspace/workspace-plugin"
|
||||
},
|
||||
{
|
||||
"name": "Nx, NodeJS and Typescript Versions",
|
||||
"id": "nx-nodejs-typescript-version-matrix",
|
||||
"file": "shared/nx-compatibility-matrix"
|
||||
"file": "shared/packages/workspace/nx-compatibility-matrix"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1484,7 +1484,7 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/nx-plugin",
|
||||
"file": "shared/nx-plugin"
|
||||
"file": "shared/packages/nx-plugin/nx-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1514,7 +1514,7 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/js",
|
||||
"file": "shared/js-plugin"
|
||||
"file": "shared/packages/js/js-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1527,7 +1527,7 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/web",
|
||||
"file": "shared/web-plugin"
|
||||
"file": "shared/packages/web/web-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1540,7 +1540,7 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/esbuild",
|
||||
"file": "shared/esbuild-plugin"
|
||||
"file": "shared/packages/esbuild/esbuild-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1553,7 +1553,7 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/vite",
|
||||
"file": "shared/vite-plugin"
|
||||
"file": "shared/packages/vite/vite-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1566,12 +1566,12 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/angular",
|
||||
"file": "shared/angular-plugin"
|
||||
"file": "shared/packages/angular/angular-plugin"
|
||||
},
|
||||
{
|
||||
"name": "Angular and Nx Version Matrix",
|
||||
"id": "angular-nx-version-matrix",
|
||||
"file": "shared/angular-nx-version-matrix",
|
||||
"file": "shared/packages/angular/angular-nx-version-matrix",
|
||||
"path": "/angular-nx-version-matrix"
|
||||
}
|
||||
]
|
||||
@ -1585,7 +1585,7 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/react",
|
||||
"file": "shared/react-plugin"
|
||||
"file": "shared/packages/react/react-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1598,7 +1598,7 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/jest",
|
||||
"file": "shared/jest-plugin"
|
||||
"file": "shared/packages/jest/jest-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1611,17 +1611,17 @@
|
||||
"name": "Overview",
|
||||
"id": "overview",
|
||||
"path": "/packages/cypress",
|
||||
"file": "shared/cypress-plugin"
|
||||
"file": "shared/packages/cypress/cypress-plugin"
|
||||
},
|
||||
{
|
||||
"name": "Component Testing",
|
||||
"id": "cypress-component-testing",
|
||||
"file": "shared/guides/cypress/cypress-component-testing"
|
||||
"file": "shared/packages/cypress/cypress-component-testing"
|
||||
},
|
||||
{
|
||||
"name": "v11 Migration Guide",
|
||||
"id": "v11-migration-guide",
|
||||
"file": "shared/guides/cypress/cypress-v11-migration"
|
||||
"file": "shared/packages/cypress/cypress-v11-migration"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1634,67 +1634,67 @@
|
||||
"id": "overview",
|
||||
"name": "Overview Generic",
|
||||
"path": "/packages/storybook",
|
||||
"file": "shared/guides/storybook/plugin-overview"
|
||||
"file": "shared/packages/storybook/plugin-overview"
|
||||
},
|
||||
{
|
||||
"id": "overview-react",
|
||||
"name": "Set up Storybook for React Projects",
|
||||
"file": "shared/guides/storybook/plugin-react"
|
||||
"file": "shared/packages/storybook/plugin-react"
|
||||
},
|
||||
{
|
||||
"id": "overview-angular",
|
||||
"name": "Set up Storybook for Angular Projects",
|
||||
"file": "shared/guides/storybook/plugin-angular"
|
||||
"file": "shared/packages/storybook/plugin-angular"
|
||||
},
|
||||
{
|
||||
"id": "best-practices",
|
||||
"name": "Storybook best practices for making the most out of Nx",
|
||||
"file": "shared/guides/storybook/best-practices"
|
||||
"file": "shared/packages/storybook/best-practices"
|
||||
},
|
||||
{
|
||||
"id": "storybook-composition-setup",
|
||||
"name": "Setting up Storybook Composition with Nx",
|
||||
"file": "shared/guides/storybook/storybook-composition-setup"
|
||||
"file": "shared/packages/storybook/storybook-composition-setup"
|
||||
},
|
||||
{
|
||||
"id": "angular-storybook-compodoc",
|
||||
"name": "Angular: Set up Compodoc for Storybook on Nx",
|
||||
"file": "shared/guides/storybook/angular-storybook-compodoc"
|
||||
"file": "shared/packages/storybook/angular-storybook-compodoc"
|
||||
},
|
||||
{
|
||||
"id": "angular-storybook-targets",
|
||||
"name": "Angular: Information about the Storybook targets",
|
||||
"file": "shared/guides/storybook/angular-storybook-targets"
|
||||
"file": "shared/packages/storybook/angular-storybook-targets"
|
||||
},
|
||||
{
|
||||
"id": "angular-configuring-styles",
|
||||
"name": "Angular: Configuring styles and preprocessor options",
|
||||
"file": "shared/guides/storybook/angular-configuring-styles"
|
||||
"file": "shared/packages/storybook/angular-configuring-styles"
|
||||
},
|
||||
{
|
||||
"id": "angular-browser-target",
|
||||
"name": "Angular: The browserTarget",
|
||||
"file": "shared/guides/storybook/angular-browser-target"
|
||||
"file": "shared/packages/storybook/angular-browser-target"
|
||||
},
|
||||
{
|
||||
"id": "migrate-webpack-final-angular",
|
||||
"name": "Angular: Storybook Webpack Migration",
|
||||
"file": "shared/guides/storybook/migrate-webpack-final-angular"
|
||||
"file": "shared/packages/storybook/migrate-webpack-final-angular"
|
||||
},
|
||||
{
|
||||
"id": "upgrade-storybook-v6-angular",
|
||||
"name": "Angular: Upgrading to Storybook 6",
|
||||
"file": "shared/guides/storybook/storybook-v6-angular"
|
||||
"file": "shared/packages/storybook/storybook-v6-angular"
|
||||
},
|
||||
{
|
||||
"id": "migrate-webpack-final-react",
|
||||
"name": "React: Migrate to the Nrwl React Storybook Preset",
|
||||
"file": "shared/guides/storybook/migrate-webpack-final-react"
|
||||
"file": "shared/packages/storybook/migrate-webpack-final-react"
|
||||
},
|
||||
{
|
||||
"id": "upgrade-storybook-v6-react",
|
||||
"name": "React: Upgrading to Storybook 6",
|
||||
"file": "shared/guides/storybook/storybook-v6-react"
|
||||
"file": "shared/packages/storybook/storybook-v6-react"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1707,12 +1707,12 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/linter",
|
||||
"file": "shared/linter-plugin"
|
||||
"file": "shared/packages/linter/linter-plugin"
|
||||
},
|
||||
{
|
||||
"id": "eslint-plugin-nx",
|
||||
"name": "eslint-plugin-nx",
|
||||
"file": "shared/eslint-plugin-nx"
|
||||
"file": "shared/packages/linter/eslint-plugin-nx"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1725,7 +1725,7 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/eslint-plugin-nx",
|
||||
"file": "shared/eslint-plugin-nx"
|
||||
"file": "shared/packages/linter/eslint-plugin-nx"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1738,7 +1738,7 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/node",
|
||||
"file": "shared/node-plugin"
|
||||
"file": "shared/packages/node/node-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1751,7 +1751,7 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/express",
|
||||
"file": "shared/express-plugin"
|
||||
"file": "shared/packages/express/express-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1764,7 +1764,7 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/nest",
|
||||
"file": "shared/nest-plugin"
|
||||
"file": "shared/packages/nest/nest-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1777,7 +1777,7 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/next",
|
||||
"file": "shared/next-plugin"
|
||||
"file": "shared/packages/next/next-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1790,7 +1790,7 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/detox",
|
||||
"file": "shared/detox-plugin"
|
||||
"file": "shared/packages/detox/detox-plugin"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1803,7 +1803,7 @@
|
||||
"id": "overview",
|
||||
"name": "Overview",
|
||||
"path": "/packages/react-native",
|
||||
"file": "shared/react-native-plugin"
|
||||
"file": "shared/packages/react-native/react-native-plugin"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
"isExternal": false,
|
||||
"path": "angular/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/angular-plugin"
|
||||
"originalFilePath": "shared/packages/angular/angular-plugin"
|
||||
},
|
||||
{
|
||||
"id": "angular-nx-version-matrix",
|
||||
@ -33,7 +33,7 @@
|
||||
"isExternal": false,
|
||||
"path": "angular/documents/angular-nx-version-matrix",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/angular-nx-version-matrix"
|
||||
"originalFilePath": "shared/packages/angular/angular-nx-version-matrix"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -460,7 +460,7 @@
|
||||
"isExternal": false,
|
||||
"path": "cypress/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/cypress-plugin"
|
||||
"originalFilePath": "shared/packages/cypress/cypress-plugin"
|
||||
},
|
||||
{
|
||||
"id": "cypress-component-testing",
|
||||
@ -471,7 +471,7 @@
|
||||
"isExternal": false,
|
||||
"path": "cypress/documents/cypress-component-testing",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/cypress/cypress-component-testing"
|
||||
"originalFilePath": "shared/packages/cypress/cypress-component-testing"
|
||||
},
|
||||
{
|
||||
"id": "v11-migration-guide",
|
||||
@ -482,7 +482,7 @@
|
||||
"isExternal": false,
|
||||
"path": "cypress/documents/v11-migration-guide",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/cypress/cypress-v11-migration"
|
||||
"originalFilePath": "shared/packages/cypress/cypress-v11-migration"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -552,7 +552,7 @@
|
||||
"isExternal": false,
|
||||
"path": "detox/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/detox-plugin"
|
||||
"originalFilePath": "shared/packages/detox/detox-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -647,7 +647,7 @@
|
||||
"isExternal": false,
|
||||
"path": "esbuild/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/esbuild-plugin"
|
||||
"originalFilePath": "shared/packages/esbuild/esbuild-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -699,7 +699,7 @@
|
||||
"isExternal": false,
|
||||
"path": "eslint-plugin-nx/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/eslint-plugin-nx"
|
||||
"originalFilePath": "shared/packages/linter/eslint-plugin-nx"
|
||||
}
|
||||
],
|
||||
"executors": [],
|
||||
@ -933,7 +933,7 @@
|
||||
"isExternal": false,
|
||||
"path": "express/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/express-plugin"
|
||||
"originalFilePath": "shared/packages/express/express-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [],
|
||||
@ -975,7 +975,7 @@
|
||||
"isExternal": false,
|
||||
"path": "jest/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/jest-plugin"
|
||||
"originalFilePath": "shared/packages/jest/jest-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -1027,7 +1027,7 @@
|
||||
"isExternal": false,
|
||||
"path": "js/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/js-plugin"
|
||||
"originalFilePath": "shared/packages/js/js-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -1106,7 +1106,7 @@
|
||||
"isExternal": false,
|
||||
"path": "linter/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/linter-plugin"
|
||||
"originalFilePath": "shared/packages/linter/linter-plugin"
|
||||
},
|
||||
{
|
||||
"id": "eslint-plugin-nx",
|
||||
@ -1117,7 +1117,7 @@
|
||||
"isExternal": false,
|
||||
"path": "linter/documents/eslint-plugin-nx",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/eslint-plugin-nx"
|
||||
"originalFilePath": "shared/packages/linter/eslint-plugin-nx"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -1180,7 +1180,7 @@
|
||||
"isExternal": false,
|
||||
"path": "nest/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/nest-plugin"
|
||||
"originalFilePath": "shared/packages/nest/nest-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [],
|
||||
@ -1375,7 +1375,7 @@
|
||||
"isExternal": false,
|
||||
"path": "next/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/next-plugin"
|
||||
"originalFilePath": "shared/packages/next/next-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -1481,7 +1481,7 @@
|
||||
"isExternal": false,
|
||||
"path": "node/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/node-plugin"
|
||||
"originalFilePath": "shared/packages/node/node-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -1855,7 +1855,7 @@
|
||||
"isExternal": false,
|
||||
"path": "nx-plugin/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/nx-plugin"
|
||||
"originalFilePath": "shared/packages/nx-plugin/nx-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -1943,7 +1943,7 @@
|
||||
"isExternal": false,
|
||||
"path": "react/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/react-plugin"
|
||||
"originalFilePath": "shared/packages/react/react-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -2130,7 +2130,7 @@
|
||||
"isExternal": false,
|
||||
"path": "react-native/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/react-native-plugin"
|
||||
"originalFilePath": "shared/packages/react-native/react-native-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -2339,7 +2339,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/plugin-overview"
|
||||
"originalFilePath": "shared/packages/storybook/plugin-overview"
|
||||
},
|
||||
{
|
||||
"id": "overview-react",
|
||||
@ -2350,7 +2350,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/overview-react",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/plugin-react"
|
||||
"originalFilePath": "shared/packages/storybook/plugin-react"
|
||||
},
|
||||
{
|
||||
"id": "overview-angular",
|
||||
@ -2361,7 +2361,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/overview-angular",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/plugin-angular"
|
||||
"originalFilePath": "shared/packages/storybook/plugin-angular"
|
||||
},
|
||||
{
|
||||
"id": "best-practices",
|
||||
@ -2372,7 +2372,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/best-practices",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/best-practices"
|
||||
"originalFilePath": "shared/packages/storybook/best-practices"
|
||||
},
|
||||
{
|
||||
"id": "storybook-composition-setup",
|
||||
@ -2383,7 +2383,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/storybook-composition-setup",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/storybook-composition-setup"
|
||||
"originalFilePath": "shared/packages/storybook/storybook-composition-setup"
|
||||
},
|
||||
{
|
||||
"id": "angular-storybook-compodoc",
|
||||
@ -2394,7 +2394,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/angular-storybook-compodoc",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/angular-storybook-compodoc"
|
||||
"originalFilePath": "shared/packages/storybook/angular-storybook-compodoc"
|
||||
},
|
||||
{
|
||||
"id": "angular-storybook-targets",
|
||||
@ -2405,7 +2405,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/angular-storybook-targets",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/angular-storybook-targets"
|
||||
"originalFilePath": "shared/packages/storybook/angular-storybook-targets"
|
||||
},
|
||||
{
|
||||
"id": "angular-configuring-styles",
|
||||
@ -2416,7 +2416,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/angular-configuring-styles",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/angular-configuring-styles"
|
||||
"originalFilePath": "shared/packages/storybook/angular-configuring-styles"
|
||||
},
|
||||
{
|
||||
"id": "angular-browser-target",
|
||||
@ -2427,7 +2427,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/angular-browser-target",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/angular-browser-target"
|
||||
"originalFilePath": "shared/packages/storybook/angular-browser-target"
|
||||
},
|
||||
{
|
||||
"id": "migrate-webpack-final-angular",
|
||||
@ -2438,7 +2438,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/migrate-webpack-final-angular",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/migrate-webpack-final-angular"
|
||||
"originalFilePath": "shared/packages/storybook/migrate-webpack-final-angular"
|
||||
},
|
||||
{
|
||||
"id": "upgrade-storybook-v6-angular",
|
||||
@ -2449,7 +2449,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/upgrade-storybook-v6-angular",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/storybook-v6-angular"
|
||||
"originalFilePath": "shared/packages/storybook/storybook-v6-angular"
|
||||
},
|
||||
{
|
||||
"id": "migrate-webpack-final-react",
|
||||
@ -2460,7 +2460,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/migrate-webpack-final-react",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/migrate-webpack-final-react"
|
||||
"originalFilePath": "shared/packages/storybook/migrate-webpack-final-react"
|
||||
},
|
||||
{
|
||||
"id": "upgrade-storybook-v6-react",
|
||||
@ -2471,7 +2471,7 @@
|
||||
"isExternal": false,
|
||||
"path": "storybook/documents/upgrade-storybook-v6-react",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/guides/storybook/storybook-v6-react"
|
||||
"originalFilePath": "shared/packages/storybook/storybook-v6-react"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -2561,7 +2561,7 @@
|
||||
"isExternal": false,
|
||||
"path": "vite/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/vite-plugin"
|
||||
"originalFilePath": "shared/packages/vite/vite-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -2640,7 +2640,7 @@
|
||||
"isExternal": false,
|
||||
"path": "web/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/web-plugin"
|
||||
"originalFilePath": "shared/packages/web/web-plugin"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
@ -2777,7 +2777,7 @@
|
||||
"isExternal": false,
|
||||
"path": "workspace/documents/overview",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/workspace-plugin"
|
||||
"originalFilePath": "shared/packages/workspace/workspace-plugin"
|
||||
},
|
||||
{
|
||||
"id": "nx-nodejs-typescript-version-matrix",
|
||||
@ -2788,7 +2788,7 @@
|
||||
"isExternal": false,
|
||||
"path": "workspace/documents/nx-nodejs-typescript-version-matrix",
|
||||
"tags": [],
|
||||
"originalFilePath": "shared/nx-compatibility-matrix"
|
||||
"originalFilePath": "shared/packages/workspace/nx-compatibility-matrix"
|
||||
}
|
||||
],
|
||||
"executors": [
|
||||
|
||||
|
Before Width: | Height: | Size: 350 KiB After Width: | Height: | Size: 350 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
@ -168,7 +168,7 @@ If you are using React, you need to use the [`@vitejs/plugin-react` plugin](http
|
||||
Add a `vite.config.ts` file to the root of your app. If you are not using React, you can skip adding the `react` plugin, of course.
|
||||
|
||||
```ts
|
||||
// eg. apps/my-app/vite.config.ts
|
||||
// e.g. apps/my-app/vite.config.ts
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import ViteTsConfigPathsPlugin from 'vite-tsconfig-paths';
|
||||
@ -193,7 +193,7 @@ In that config file, you can configure Vite.js as you would normally do. For mor
|
||||
|
||||
You can create a `vite.config.ts` file to the root of your workspace, as well as at the root of each of your applications. This file is used to configure Vite. You can read more about the configuration options in the [Vite documentation](https://vitejs.dev/config/).
|
||||
|
||||
The root `vite.config.ts` file can be used for all applications, and you can place in there general configurations that would apply for all your apps using Vite in your workspace. The application-specific `vite.config.ts` files can be used to override the root configuration, or, for example, import framework-specific plugins (eg. the `'@vitejs/plugin-react'` for React apps). The application-specific configuration files extend (using [`mergeConfig`](https://vitejs.dev/guide/api-javascript.html#mergeconfig)) the root configuration file. You can adjust this behavior to your needs.
|
||||
The root `vite.config.ts` file can be used for all applications, and you can place in here general configurations that would apply for all your apps using Vite in your workspace. The application-specific `vite.config.ts` files can be used to override the root configuration, or, for example, import framework-specific plugins (e.g. the `'@vitejs/plugin-react'` for React apps). The application-specific configuration files extend (using [`mergeConfig`](https://vitejs.dev/guide/api-javascript.html#mergeconfig)) the root configuration file. You can adjust this behavior to your needs.
|
||||
|
||||
So, if you are using a root `vite.config.ts` file, you should adjust your code as follows:
|
||||
|
||||
@ -209,7 +209,7 @@ export default defineConfig({
|
||||
and then in your app's `vite.config.ts` file:
|
||||
|
||||
```ts
|
||||
// eg. apps/my-app/vite.config.ts
|
||||
// e.g. apps/my-app/vite.config.ts
|
||||
import { mergeConfig } from 'vite';
|
||||
import baseConfig from '../../vite.config';
|
||||
import react from '@vitejs/plugin-react';
|
||||
@ -227,7 +227,7 @@ export default mergeConfig(baseConfig, {
|
||||
|
||||
### 3. Move `index.html` and point it to your app's entrypoint
|
||||
|
||||
First of all, move your `index.html` file to the root of your app (eg. from `apps/my-app/src/index.html` to `apps/my-app/index.html`).
|
||||
First of all, move your `index.html` file to the root of your app (e.g. from `apps/my-app/src/index.html` to `apps/my-app/index.html`).
|
||||
|
||||
Then, add a module `script` tag pointing to the `main.tsx` (or `main.ts`) file of your app:
|
||||
|
||||
@ -268,7 +268,7 @@ You can use the `public` folder to store static **assets**, such as images, font
|
||||
|
||||
### 5. Adjust your app's tsconfig.json
|
||||
|
||||
Change your app's `tsconfig.json` (eg. `apps/my-app/tsconfig.json`) `compilerOptions` to the following:
|
||||
Change your app's `tsconfig.json` (e.g. `apps/my-app/tsconfig.json`) `compilerOptions` to the following:
|
||||
|
||||
#### For React apps
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user