Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(misc): v19 cleanup for Nx plugins #23104

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/generated/cli/create-nx-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Prefix to use for Angular component and directive selectors.

Type: `string`

Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "remix-monorepo", "remix-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset
Customizes the initial content of your workspace. Default presets include: ["apps", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "remix-monorepo", "remix-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset

### routing

Expand Down
8 changes: 0 additions & 8 deletions docs/generated/manifests/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -7017,14 +7017,6 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "cypress-project",
"path": "/nx-api/cypress/generators/cypress-project",
"name": "cypress-project",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "configuration",
"path": "/nx-api/cypress/generators/configuration",
Expand Down
9 changes: 0 additions & 9 deletions docs/generated/manifests/nx-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,15 +510,6 @@
"path": "/nx-api/cypress/generators/init",
"type": "generator"
},
"/nx-api/cypress/generators/cypress-project": {
"description": "Add a Cypress E2E Project.",
"file": "generated/packages/cypress/generators/cypress-project.json",
"hidden": true,
"name": "cypress-project",
"originalFilePath": "/packages/cypress/src/generators/cypress-project/schema.json",
"path": "/nx-api/cypress/generators/cypress-project",
"type": "generator"
},
"/nx-api/cypress/generators/configuration": {
"description": "Add a Cypress E2E Configuration to an existing project.",
"file": "generated/packages/cypress/generators/configuration.json",
Expand Down
9 changes: 0 additions & 9 deletions docs/generated/packages-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,15 +502,6 @@
"path": "cypress/generators/init",
"type": "generator"
},
{
"description": "Add a Cypress E2E Project.",
"file": "generated/packages/cypress/generators/cypress-project.json",
"hidden": true,
"name": "cypress-project",
"originalFilePath": "/packages/cypress/src/generators/cypress-project/schema.json",
"path": "cypress/generators/cypress-project",
"type": "generator"
},
{
"description": "Add a Cypress E2E Configuration to an existing project.",
"file": "generated/packages/cypress/generators/configuration.json",
Expand Down
84 changes: 0 additions & 84 deletions docs/generated/packages/cypress/generators/cypress-project.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Prefix to use for Angular component and directive selectors.

Type: `string`

Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "remix-monorepo", "remix-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset
Customizes the initial content of your workspace. Default presets include: ["apps", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "remix-monorepo", "remix-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset

### routing

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/webpack/executors/webpack.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@
]
}
},
"examplesFile": "---\ntitle: Examples for the @nx/webpack:webpack build executor\ndescription: Examples and a short guide on how to use the @nx/webpack:webpack build executor\n---\n\n`project.json`:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nx/webpack:webpack\",\n //...\n //...\n \"options\": {\n ...\n },\n //...\n }\n },\n }\n}\n```\n\n```bash\nnx build my-app\n```\n\n## Examples\n\n{% tabs %}\n\n{% tab label=\"Using `babelUpwardRootMode`\" %}\n\nCopying from the [Babel documentation](https://babeljs.io/docs/config-files#root-babelconfigjson-file):\n\n> [...] if you are running your Babel compilation process from within a subpackage, you need to tell Babel where to look for the config. There are a few ways to do that, but the recommended way is the \"rootMode\" option with \"upward\", which will make Babel search from the working directory upward looking for your babel.config.json file, and will use its location as the \"root\" value.\n\nSetting `babelUpwardRootMode` to `true` in your `project.json` will set `rootMode` option to `upward` in the Babel config. You may want the `upward` mode in a monorepo when projects must apply their individual `.babelrc` file. We recommend that you don't set it at all, so it will use the default to `false` as the `upward` mode brings additional complexity to the build process.\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/webpack:webpack\",\n \"options\": {\n \"babelUpwardRootMode\": true,\n //...\n },\n //...\n },\n //...\n },\n //...\n}\n```\n\nWhen `babelUpwardRootMode` is `true`, Babel will look for a root `babel.config.json` at the root of the workspace, which should look something like this to include all packages:\n\n```json\n{ \"babelrcRoots\": [\"*\"] }\n```\n\nThen for each package, you must have a `.babelrc` file that will be applied to that package. For example:\n\n```json\n{\n \"presets\": [\"@babel/preset-env\", \"@babel/preset-typescript\"]\n}\n```\n\nAll packages will use its own `.babelrc` file, thus you must ensure the right presets and plugins are set in each config file. This behavior can lead to build discrepancies between packages, so we recommend that you don't set `babelUpwardRootMode` at all.\n\n```treeview\n├── apps\n│ └── demo\n│ └── .babelrc\n├── libs\n│ ├── a\n│ │ └── .babelrc\n│ └── b\n│ └── .babelrc\n└── babel.config.json\n```\n\nIn workspace above, if `demo` imports `a` and `b`, it will apply the config `libs/a/.babelrc` and `libs/b/.babelrc` to the respective packages and not apply its own `apps/demo/.babelrc` to `a` and `b`. Anything in `babel.config.json` will apply to all packages.\n\n{% /tab %}\n\n{% tab label=\"Specify a custom Babel config file\" %}\n\nIf you have a custom Babel config file (i.e. not `.babelrc`), you can use the `configFile` option as follows:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nx/webpack:webpack\",\n //...\n \"options\": {\n //...\n \"babelConfig\": \"apps/my-app/.babelrc.custom.json\",\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\nIf you do not set the path to the `.babelrc` file, Nx will look for a `.babelrc` file in the root of your application.\n\nNote that this option does not work if `babelUpwardRootMode` is set to `true`.\n\n{% /tab %}\n\n{% tab label=\"Run webpack with `isolatedConfig`\" %}\n\nSetting `isolatedConfig` to `true` in your `project.json` file means that Nx will not apply the Nx webpack plugins automatically. In that case, the Nx plugins need to be applied in the project's `webpack.config.js` file (e.g. `withNx`, `withReact`, etc.). So don't forget to also specify the path to your webpack config file (using the `webpackConfig` option).\n\nRead more on how to configure Webpack in our [Nx Webpack config guide](/recipes/webpack/webpack-config-setup) an in our [Webpack Plugins guide](/recipes/webpack/webpack-plugins).\n\nNote that this is the new default setup for webpack in the latest version of Nx.\n\nSet `isolatedConfig` to `true` in your `project.json` file in the `build` target options like this:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n //...\n \"build\": {\n \"executor\": \"@nx/webpack:webpack\",\n //...\n \"options\": {\n //...\n \"webpackConfig\": \"apps/my-app/webpack.config.js\",\n \"isolatedConfig\": true\n },\n \"configurations\": {\n ...\n }\n },\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"examplesFile": "---\ntitle: Examples for the @nx/webpack:webpack build executor\ndescription: Examples and a short guide on how to use the @nx/webpack:webpack build executor\n---\n\n`project.json`:\n\n```json5\n//...\n\"my-app\": {\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/webpack:webpack\",\n \"options\": {\n \"webpackConfig\": \"apps/my-app/webpack.config.js\"\n }\n },\n //...\n }\n}\n```\n\n```bash\nnx build my-app\n```\n\n## Examples\n\n{% tabs %}\n\n{% tab label=\"Using `babelUpwardRootMode`\" %}\n\nCopying from the [Babel documentation](https://babeljs.io/docs/config-files#root-babelconfigjson-file):\n\n> [...] if you are running your Babel compilation process from within a subpackage, you need to tell Babel where to look for the config. There are a few ways to do that, but the recommended way is the \"rootMode\" option with \"upward\", which will make Babel search from the working directory upward looking for your babel.config.json file, and will use its location as the \"root\" value.\n\nSetting `babelUpwardRootMode` to `true` in your `project.json` will set `rootMode` option to `upward` in the Babel config. You may want the `upward` mode in a monorepo when projects must apply their individual `.babelrc` file. We recommend that you don't set it at all, so it will use the default to `false` as the `upward` mode brings additional complexity to the build process.\n\n```json5\n//...\n\"my-app\": {\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/webpack:webpack\",\n \"options\": {\n \"webpackConfig\": \"apps/my-app/webpack.config.js\",\n \"babelUpwardRootMode\": true\n }\n },\n //...\n }\n}\n```\n\nWhen `babelUpwardRootMode` is `true`, Babel will look for a root `babel.config.json` at the root of the workspace, which should look something like this to include all packages:\n\n```json\n{ \"babelrcRoots\": [\"*\"] }\n```\n\nThen for each package, you must have a `.babelrc` file that will be applied to that package. For example:\n\n```json\n{\n \"presets\": [\"@babel/preset-env\", \"@babel/preset-typescript\"]\n}\n```\n\nAll packages will use its own `.babelrc` file, thus you must ensure the right presets and plugins are set in each config file. This behavior can lead to build discrepancies between packages, so we recommend that you don't set `babelUpwardRootMode` at all.\n\n```treeview\n├── apps\n│ └── demo\n│ └── .babelrc\n├── libs\n│ ├── a\n│ │ └── .babelrc\n│ └── b\n│ └── .babelrc\n└── babel.config.json\n```\n\nIn workspace above, if `demo` imports `a` and `b`, it will apply the config `libs/a/.babelrc` and `libs/b/.babelrc` to the respective packages and not apply its own `apps/demo/.babelrc` to `a` and `b`. Anything in `babel.config.json` will apply to all packages.\n\n{% /tab %}\n\n{% tab label=\"Specify a custom Babel config file\" %}\n\nIf you have a custom Babel config file (i.e. not `.babelrc`), you can use the `configFile` option as follows:\n\n```json5\n//...\n\"my-app\": {\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/webpack:webpack\",\n \"options\": {\n \"webpackConfig\": \"apps/my-app/webpack.config.js\",\n \"babelConfig\": \"apps/my-app/.babelrc.custom.json\",\n }\n },\n // ...\n }\n}\n```\n\nIf you do not set the path to the `.babelrc` file, Nx will look for a `.babelrc` file in the root of your application.\n\nNote that this option does not work if `babelUpwardRootMode` is set to `true`.\n\n{% /tab %}\n\n{% tab label=\"Run webpack with `isolatedConfig`\" %}\n\nSetting `isolatedConfig` to `true` in your `project.json` file means that Nx will not apply the Nx webpack plugins automatically. In that case, the Nx plugins need to be applied in the project's `webpack.config.js` file (e.g. `withNx`, `withReact`, etc.). So don't forget to also specify the path to your webpack config file (using the `webpackConfig` option).\n\nRead more on how to configure Webpack in our [Nx Webpack config guide](/recipes/webpack/webpack-config-setup) an in our [Webpack Plugins guide](/recipes/webpack/webpack-plugins).\n\nNote that this is the new default setup for webpack in the latest version of Nx.\n\nSet `isolatedConfig` to `true` in your `project.json` file in the `build` target options like this:\n\n```json\n//...\n\"my-app\": {\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/webpack:webpack\",\n \"options\": {\n \"webpackConfig\": \"apps/my-app/webpack.config.js\",\n \"isolatedConfig\": true\n }\n },\n }\n}\n```\n\n{% /tab %}\n\n{% /tabs %}\n",
"presets": []
},
"description": "Run webpack build.",
Expand Down
1 change: 0 additions & 1 deletion docs/shared/reference/sitemap.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@
- [cypress](/nx-api/cypress/executors/cypress)
- [generators](/nx-api/cypress/generators)
- [init](/nx-api/cypress/generators/init)
- [cypress-project](/nx-api/cypress/generators/cypress-project)
- [configuration](/nx-api/cypress/generators/configuration)
- [component-configuration](/nx-api/cypress/generators/component-configuration)
- [migrate-to-cypress-11](/nx-api/cypress/generators/migrate-to-cypress-11)
Expand Down
Loading