docs(core): add migrations docs for 20.x (#30186)
Adds migration docs for all 20.0 through 20.4 migrations
This commit is contained in:
parent
6fcb310e54
commit
8b11d8bfe5
@ -11,5 +11,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Add Localize Polyfill to Targets\n\nAdd the '@angular/localize/init' polyfill to the 'polyfills' option of targets using esbuild-based executors.\n\n#### Sample Code Changes\n\nAdd the `@angular/localize/init` polyfill to any of these executors:\n\n- `@angular/build:application`\n- `@angular-devkit/build-angular:application`\n- `@nx/angular:application`\n- `@angular-devkit/build-angular:browser-esbuild`\n- `@nx/angular:browser-esbuild`\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"apps/app1/project.json\" %}\n{\n \"targets\": {\n \"build\": {\n \"executor\": \"@angular/build:application\",\n \"options\": {\n \"localize\": true\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"apps/app1/project.json\" %}\n{\n \"targets\": {\n \"build\": {\n \"executor\": \"@angular/build:application\",\n \"options\": {\n \"localize\": true,\n \"polyfills\": [\"@angular/localize/init\"]\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -10,5 +10,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Ensure the @nx/module-federation Package is Installed\n\nIf workspace includes Module Federation projects, ensure the new `@nx/module-federation` package is installed.\n\n#### Sample Code Changes\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"package.json\" %}\n{\n \"dependencies\": {}\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"@nx/module-federation\": \"20.3.0\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -11,5 +11,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Remove Angular ESLint Rules\n\nRemove Angular ESLint rules that were removed in v19.0.0.\n\n#### Sample Code Changes\n\nRemoves `@angular-eslint/no-host-metadata-property`, `@angular-eslint/sort-ngmodule-metadata-arrays` and `@angular-eslint/prefer-standalone-component` from any ESLint config file. Files to be searched include `.eslintrc.json`, `.eslintrc.base.json`, `.eslint.config.js` and `.eslint.config.base.js`.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"apps/app1/.eslintrc.json\" %}\n{\n \"overrides\": [\n {\n \"files\": [\"*.ts\"],\n \"rules\": {\n \"@angular-eslint/no-host-metadata-property\": [\"error\"],\n \"@angular-eslint/sort-ngmodule-metadata-arrays\": [\"error\"],\n \"@angular-eslint/prefer-standalone-component\": [\"error\"]\n }\n }\n ]\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"apps/app1/.eslintrc.json\" %}\n{\n \"overrides\": [\n {\n \"files\": [\"*.ts\"],\n \"rules\": {}\n }\n ]\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -11,5 +11,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Remove tailwindConfig from ng-packagr Executors\n\nRemove the deprecated 'tailwindConfig' option from ng-packagr executors. Tailwind CSS configurations located at the project or workspace root will be picked up automatically.\n\n#### Sample Code Changes\n\nRemove `tailwindConfig` from the `@nx/angular:ng-packagr-lite` or `@nx/angular:package` executor options in project configuration.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"libs/my-lib/project.json\" %}\n{\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/angular:ng-packagr-lite\",\n \"options\": {\n \"project\": \"libs/lib1/ng-package.json\",\n \"tailwindConfig\": \"libs/lib1/tailwind.config.js\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"libs/my-lib/project.json\" %}\n{\n \"targets\": {\n \"build\": {\n \"executor\": \"@nx/angular:ng-packagr-lite\",\n \"options\": {\n \"project\": \"libs/lib1/ng-package.json\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\nRemove `tailwindConfig` from the `@nx/angular:ng-packagr-lite` or `@nx/angular:package` executor target defaults in `nx.json`.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"targetDefaults\": {\n \"@nx/angular:ng-packagr-lite\": {\n \"options\": {\n \"project\": \"{projectRoot}/ng-package.json\",\n \"tailwindConfig\": \"{projectRoot}/tailwind.config.js\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"targetDefaults\": {\n \"@nx/angular:ng-packagr-lite\": {\n \"options\": {\n \"project\": \"{projectRoot}/ng-package.json\"\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Migrate Module Federation Imports to New Package\n\nUpdate the ModuleFederationConfig imports to use @nx/module-federation.\n\n#### Sample Code Changes\n\nUpdate import paths for ModuleFederationConfig.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```js {% fileName=\"apps/shell/webpack.config.js\" %}\nimport { ModuleFederationConfig } from '@nx/webpack';\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```js {% fileName=\"apps/shell/webpack.config.js\" %}\nimport { ModuleFederationConfig } from '@nx/module-federation';\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Migrate withModuleFederation Import to New Package\n\nUpdate the withModuleFederation import to use @nx/module-federation/webpack.\n\n#### Sample Code Changes\n\nUpdate import paths for `withModuleFederation` and `withModuleFederationForSSR`.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```ts {% fileName=\"apps/shell/webpack.config.ts\" %}\nimport {\n withModuleFederation,\n withModuleFederationForSSR,\n} from '@nx/angular/module-federation';\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```ts {% fileName=\"apps/shell/webpack.config.ts\" %}\nimport {\n withModuleFederation,\n withModuleFederationForSSR,\n} from '@nx/module-federation/angular';\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -11,5 +11,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Update `@angular/cli` to `~19.0.0`\n\nUpdate the version of the Angular CLI if it is specified in `package.json`\n\n#### Sample Code Changes\n\nUpdate in `devDependencies`:\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```{% fileName=\"package.json\" %}\n{\n \"devDependencies\": {\n \"@angular/cli\": \"~13.3.0\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```{% fileName=\"package.json\" %}\n{\n \"devDependencies\": {\n \"@angular/cli\": \"~19.0.0\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\nUpdate in `dependencies`:\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```{% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"@angular/cli\": \"~13.3.0\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```{% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"@angular/cli\": \"~19.0.0\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -11,5 +11,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Update `@angular/cli` to `~19.1.0`\n\nUpdate the version of the Angular CLI if it is specified in `package.json`\n\n#### Sample Code Changes\n\nUpdate in `devDependencies`:\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```{% fileName=\"package.json\" %}\n{\n \"devDependencies\": {\n \"@angular/cli\": \"~13.3.0\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```{% fileName=\"package.json\" %}\n{\n \"devDependencies\": {\n \"@angular/cli\": \"~19.1.0\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\nUpdate in `dependencies`:\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```{% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"@angular/cli\": \"~13.3.0\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```{% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"@angular/cli\": \"~19.1.0\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -11,5 +11,5 @@
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Update Angular SSR Imports to Use Node Entry Point\n\nUpdate '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected.\n\n#### Sample Code Changes\n\nUpdate import paths for SSR CommonEngine properties to use `@angular/ssr/node`.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```ts {% fileName=\"apps/app1/server.ts\" %}\nimport { CommonEngine } from '@angular/ssr';\nimport type {\n CommonEngineOptions,\n CommonEngineRenderOptions,\n} from '@angular/ssr';\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```ts {% fileName=\"apps/app1/server.ts\" %}\nimport { CommonEngine } from '@angular/ssr/node';\nimport type {\n CommonEngineOptions,\n CommonEngineRenderOptions,\n} from '@angular/ssr/node';\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -8,5 +8,5 @@
|
||||
"path": "/packages/eslint",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Update ESLint Config File Extensions in Overrides\n\nUpdate ESLint flat config to include .cjs, .mjs, .cts, and .mts files in overrides (if needed)\n\n#### Sample Code Changes\n\nAdd `.cjs`, `.mjs`, `.cts`, `.mts` file extensions to overrides converted using `convert-to-flat-config`\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```js {% fileName=\"eslint.config.js\" %}\nconst { FlatCompat } = require('@eslint/eslintrc');\nconst js = require('@eslint/js');\nconst nxEslintPlugin = require('@nx/eslint-plugin');\n\nconst compat = new FlatCompat({\n baseDirectory: __dirname,\n recommendedConfig: js.configs.recommended,\n});\n\nmodule.exports = [\n ...compat\n .config({\n extends: ['plugin:@nx/typescript'],\n })\n .map((config) => ({\n ...config,\n files: ['**/*.ts', '**/*.tsx'],\n rules: {\n ...config.rules,\n },\n })),\n ...compat\n .config({\n extends: ['plugin:@nx/javascript'],\n })\n .map((config) => ({\n ...config,\n files: ['**/*.js', '**/*.jsx'],\n rules: {\n ...config.rules,\n },\n })),\n];\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```js {% highlightLines=[17,28] fileName=\"eslint.config.js\" %}\nconst { FlatCompat } = require('@eslint/eslintrc');\nconst js = require('@eslint/js');\nconst nxEslintPlugin = require('@nx/eslint-plugin');\n\nconst compat = new FlatCompat({\n baseDirectory: __dirname,\n recommendedConfig: js.configs.recommended,\n});\n\nmodule.exports = [\n ...compat\n .config({\n extends: ['plugin:@nx/typescript'],\n })\n .map((config) => ({\n ...config,\n files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],\n rules: {\n ...config.rules,\n },\n })),\n ...compat\n .config({\n extends: ['plugin:@nx/javascript'],\n })\n .map((config) => ({\n ...config,\n files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],\n rules: {\n ...config.rules,\n },\n })),\n];\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -8,5 +8,5 @@
|
||||
"path": "/packages/eslint",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Update TypeScript ESLint to v8.13.0\n\nUpdate TypeScript ESLint packages to v8.13.0 if they are already on v8\n\n#### Sample Code Changes\n\nThis migration will update `typescript-eslint`, `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser` and `@typescript-eslint/utils` to `8.13.0` if they are between version `8.0.0` and `8.13.0`.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"package.json\" %}\n{\n \"devDependencies\": {\n \"typescript-eslint\": \"^8.0.0\",\n \"@typescript-eslint/eslint-plugin\": \"^8.0.0\",\n \"@typescript-eslint/parser\": \"^8.0.0\",\n \"@typescript-eslint/utils\": \"^8.0.0\"\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"package.json\" %}\n{\n \"devDependencies\": {\n \"typescript-eslint\": \"^8.13.0\",\n \"@typescript-eslint/eslint-plugin\": \"^8.13.0\",\n \"@typescript-eslint/parser\": \"^8.13.0\",\n \"@typescript-eslint/utils\": \"^8.13.0\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/gradle",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Add includeSubprojectsTasks to build.gradle File\n\nAdd includeSubprojectsTasks to build.gradle file\n\n#### Sample Code Changes\n\nUpdate import paths for `withModuleFederation` and `withModuleFederationForSSR`.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"plugins\": [\"@nx/gradle\"]\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% highlightLines=[5] fileName=\"nx.json\" %}\n{\n \"plugins\": [\n {\n \"options\": {\n \"includeSubprojectsTasks\": true\n },\n \"plugin\": \"@nx/gradle\"\n }\n ]\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -9,5 +9,5 @@
|
||||
"path": "/packages/jest",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Replace getJestProjects with getJestProjectsAsync\n\nReplace getJestProjects with getJestProjectsAsync\n\n#### Sample Code Changes\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```ts {% fileName=\"jest.config.ts\" %}\nimport { getJestProjects } from '@nx/jest';\n\nexport default {\n projects: getJestProjects(),\n};\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```ts {% fileName=\"jest.config.ts\" %}\nimport { getJestProjectsAsync } from '@nx/jest';\n\nexport default async () => ({\n projects: await getJestProjectsAsync(),\n});\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -8,5 +8,5 @@
|
||||
"path": "/packages/nx",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Move useDaemonProcess\n\nMove the `useDaemonProcess` to the root of `nx.json`\n\n#### Sample Code Changes\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"tasksRunnerOptions\": {\n \"default\": {\n \"options\": {\n \"useDaemonProcess\": false\n }\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"useDaemonProcess\": false\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -9,5 +9,5 @@
|
||||
"path": "/packages/nx",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Use Legacy Cache\n\nSet `useLegacyCache` to true for migrating workspaces\n\n#### Sample Code Changes\n\nAdd `useLegacyCache` to `nx.json` unless `enableDbCache` was set to true.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"targetDefaults\": {}\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"targetDefaults\": {},\n \"useLegacyCache\": true\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/react",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Add Module Federation Env Var to Target Defaults\n\nAdd NX_MF_DEV_REMOTES to inputs for task hashing when `@nx/webpack:webpack` or `@nx/rspack:rspack` is used for Module Federation.\n\n#### Sample Code Changes\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"targetDefaults\": {\n \"@nx/webpack:webpack\": {\n \"inputs\": [\"^build\"]\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% highlightLines=[4,5,6] fileName=\"nx.json\" %}\n{\n \"targetDefaults\": {\n \"@nx/webpack:webpack\": {\n \"cache\": true,\n \"dependsOn\": [\"^build\"],\n \"inputs\": [\n \"^build\",\n {\n \"env\": \"NX_MF_DEV_REMOTES\"\n }\n ]\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/react",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Add Module Federation Env Var to Target Defaults\n\nAdd NX_MF_DEV_REMOTES to inputs for task hashing when `@nx/webpack:webpack` or `@nx/rspack:rspack` is used for Module Federation.\n\n#### Sample Code Changes\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"nx.json\" %}\n{\n \"targetDefaults\": {\n \"@nx/webpack:webpack\": {\n \"inputs\": [\"^build\"]\n }\n }\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% highlightLines=[4,5,6] fileName=\"nx.json\" %}\n{\n \"targetDefaults\": {\n \"@nx/webpack:webpack\": {\n \"cache\": true,\n \"dependsOn\": [\"^build\"],\n \"inputs\": [\n \"^build\",\n {\n \"env\": \"NX_MF_DEV_REMOTES\"\n }\n ]\n }\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/react",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Ensure the @nx/module-federation Package is Installed\n\nIf workspace includes Module Federation projects, ensure the new `@nx/module-federation` package is installed.\n\n#### Sample Code Changes\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"package.json\" %}\n{\n \"dependencies\": {}\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"@nx/module-federation\": \"20.3.0\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/react",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Migrate Module Federation Imports to New Package\n\nUpdate the ModuleFederationConfig imports to use @nx/module-federation.\n\n#### Sample Code Changes\n\nUpdate import paths for ModuleFederationConfig.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```js {% fileName=\"apps/shell/webpack.config.js\" %}\nimport { ModuleFederationConfig } from '@nx/webpack';\n```\n\n```js {% fileName=\"apps/shell/rspack.config.js\" %}\nimport { ModuleFederationConfig } from '@nx/rspack/module-federation';\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```js {% fileName=\"apps/shell/webpack.config.js\" %}\nimport { ModuleFederationConfig } from '@nx/module-federation';\n```\n\n```js {% fileName=\"apps/shell/rspack.config.js\" %}\nimport { ModuleFederationConfig } from '@nx/module-federation';\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/react",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Migrate withModuleFederation Import to New Package\n\nUpdate the withModuleFederation import to use @nx/module-federation/webpack.\n\n#### Sample Code Changes\n\nUpdate import paths for `withModuleFederation` and `withModuleFederationForSSR`.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```ts {% fileName=\"apps/shell/webpack.config.ts\" %}\nimport {\n withModuleFederation,\n withModuleFederationForSSR,\n} from '@nx/react/module-federation';\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```ts {% fileName=\"apps/shell/webpack.config.ts\" %}\nimport {\n withModuleFederation,\n withModuleFederationForSSR,\n} from '@nx/module-federation/webpack';\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/rspack",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Ensure the @nx/module-federation Package is Installed\n\nIf workspace includes Module Federation projects, ensure the new `@nx/module-federation` package is installed.\n\n#### Sample Code Changes\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```json {% fileName=\"package.json\" %}\n{\n \"dependencies\": {}\n}\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```json {% fileName=\"package.json\" %}\n{\n \"dependencies\": {\n \"@nx/module-federation\": \"20.3.0\"\n }\n}\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -10,5 +10,5 @@
|
||||
"path": "/packages/rspack",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Migrate withModuleFederation Import to New Package\n\nUpdate the withModuleFederation import to use @nx/module-federation/rspack.\n\n#### Sample Code Changes\n\nUpdate import paths for `withModuleFederation` and `withModuleFederationForSSR`.\n\n{% tabs %}\n{% tab label=\"Before\" %}\n\n```ts {% fileName=\"apps/shell/rspack.config.ts\" %}\nimport {\n withModuleFederation,\n withModuleFederationForSSR,\n} from '@nx/rspack/module-federation';\n```\n\n{% /tab %}\n{% tab label=\"After\" %}\n\n```ts {% fileName=\"apps/shell/rspack.config.ts\" %}\nimport {\n withModuleFederation,\n withModuleFederationForSSR,\n} from '@nx/module-federation/rspack';\n```\n\n{% /tab %}\n{% /tabs %}\n"
|
||||
}
|
||||
|
||||
@ -8,5 +8,5 @@
|
||||
"path": "/packages/vite",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Add Vite Temp Files to Git Ignore\n\nAdd gitignore entry for temporary vite config files.\n\n#### Sample Code Changes\n\nAdds the following entries to the `.gitignore` file.\n\n```text {% fileName=\".gitignore\" %}\nvite.config.*.timestamp*\nvitest.config.*.timestamp*\n```\n"
|
||||
}
|
||||
|
||||
@ -8,5 +8,5 @@
|
||||
"path": "/packages/vite",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Add Vite Temp Files to Git Ignore\n\nAdd gitignore entry for temporary vite config files.\n\n#### Sample Code Changes\n\nAdds the following entries to the `.gitignore` file.\n\n```text {% fileName=\".gitignore\" %}\nvite.config.*.timestamp*\nvitest.config.*.timestamp*\n```\n"
|
||||
}
|
||||
|
||||
@ -8,5 +8,5 @@
|
||||
"path": "/packages/vite",
|
||||
"schema": null,
|
||||
"type": "migration",
|
||||
"examplesFile": ""
|
||||
"examplesFile": "#### Add Vitest Temp Files to Git Ignore\n\nAdd gitignore entry for temporary vitest config files.\n\n#### Sample Code Changes\n\nAdds the following entries to the `.gitignore` file.\n\n```text {% fileName=\".gitignore\" %}\nvite.config.*.timestamp*\nvitest.config.*.timestamp*\n```\n"
|
||||
}
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
#### Add Localize Polyfill to Targets
|
||||
|
||||
Add the '@angular/localize/init' polyfill to the 'polyfills' option of targets using esbuild-based executors.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Add the `@angular/localize/init` polyfill to any of these executors:
|
||||
|
||||
- `@angular/build:application`
|
||||
- `@angular-devkit/build-angular:application`
|
||||
- `@nx/angular:application`
|
||||
- `@angular-devkit/build-angular:browser-esbuild`
|
||||
- `@nx/angular:browser-esbuild`
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="apps/app1/project.json" %}
|
||||
{
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@angular/build:application",
|
||||
"options": {
|
||||
"localize": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="apps/app1/project.json" %}
|
||||
{
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@angular/build:application",
|
||||
"options": {
|
||||
"localize": true,
|
||||
"polyfills": ["@angular/localize/init"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,480 @@
|
||||
#### Disable Angular ESLint Prefer Standalone
|
||||
|
||||
Disable the Angular ESLint prefer-standalone rule if not set.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update import paths for `withModuleFederation` and `withModuleFederationForSSR`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="apps/app1/.eslintrc.json" %}
|
||||
{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"rules": {
|
||||
"some-rule-for-html": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="apps/app1/.eslintrc.json" %}
|
||||
{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"rules": {
|
||||
"some-rule-for-html": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@angular-eslint/prefer-standalone": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
import {
|
||||
addProjectConfiguration,
|
||||
writeJson,
|
||||
type ProjectConfiguration,
|
||||
type ProjectGraph,
|
||||
type Tree,
|
||||
} from '@nx/devkit';
|
||||
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
|
||||
import migration from './disable-angular-eslint-prefer-standalone';
|
||||
|
||||
let projectGraph: ProjectGraph;
|
||||
jest.mock('@nx/devkit', () => ({
|
||||
...jest.requireActual('@nx/devkit'),
|
||||
createProjectGraphAsync: () => Promise.resolve(projectGraph),
|
||||
}));
|
||||
|
||||
describe('disable-angular-eslint-prefer-standalone', () => {
|
||||
let tree: Tree;
|
||||
|
||||
beforeEach(() => {
|
||||
tree = createTreeWithEmptyWorkspace();
|
||||
|
||||
const projectConfig: ProjectConfiguration = {
|
||||
name: 'app1',
|
||||
root: 'apps/app1',
|
||||
};
|
||||
projectGraph = {
|
||||
dependencies: {
|
||||
app1: [
|
||||
{
|
||||
source: 'app1',
|
||||
target: 'npm:@angular/core',
|
||||
type: 'static',
|
||||
},
|
||||
],
|
||||
},
|
||||
nodes: {
|
||||
app1: {
|
||||
data: projectConfig,
|
||||
name: 'app1',
|
||||
type: 'app',
|
||||
},
|
||||
},
|
||||
};
|
||||
addProjectConfiguration(tree, projectConfig.name, projectConfig);
|
||||
|
||||
});
|
||||
|
||||
describe('.eslintrc.json', () => {
|
||||
it('should not disable @angular-eslint/prefer-standalone when it is set', async () => {
|
||||
writeJson(tree, 'apps/app1/.eslintrc.json', {
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { '@angular-eslint/prefer-standalone': ['error'] },
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/.eslintrc.json', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@angular-eslint/prefer-standalone": ["error"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
it('should not disable @angular-eslint/prefer-standalone when there are multiple overrides for angular eslint and the rule is set in one of them', async () => {
|
||||
writeJson(tree, 'apps/app1/.eslintrc.json', {
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: {
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{ type: 'attribute', prefix: 'app', style: 'camelCase' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { '@angular-eslint/prefer-standalone': ['error'] },
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/.eslintrc.json', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "attribute",
|
||||
"prefix": "app",
|
||||
"style": "camelCase"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@angular-eslint/prefer-standalone": ["error"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
it('should disable @angular-eslint/prefer-standalone in an existing override for angular eslint', async () => {
|
||||
writeJson(tree, 'apps/app1/.eslintrc.json', {
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { 'no-unused-vars': 'error' },
|
||||
},
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: {
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{ type: 'attribute', prefix: 'app', style: 'camelCase' },
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/.eslintrc.json', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"no-unused-vars": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "attribute",
|
||||
"prefix": "app",
|
||||
"style": "camelCase"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/prefer-standalone": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
it('should disable @angular-eslint/prefer-standalone in an existing override for ts files', async () => {
|
||||
writeJson(tree, 'apps/app1/.eslintrc.json', {
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { 'no-unused-vars': 'error' },
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/.eslintrc.json', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"no-unused-vars": "error",
|
||||
"@angular-eslint/prefer-standalone": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
it('should disable @angular-eslint/prefer-standalone in a new override', async () => {
|
||||
writeJson(tree, 'apps/app1/.eslintrc.json', {
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.html'],
|
||||
rules: { 'some-rule-for-html': 'error' },
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/.eslintrc.json', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"rules": {
|
||||
"some-rule-for-html": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@angular-eslint/prefer-standalone": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('flat config', () => {
|
||||
it('should not disable @angular-eslint/prefer-standalone when it is set', async () => {
|
||||
tree.write('eslint.config.js', 'module.exports = [];');
|
||||
tree.write(
|
||||
'apps/app1/eslint.config.js',
|
||||
`module.exports = [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { '@angular-eslint/prefer-standalone': ['error'] },
|
||||
},
|
||||
];
|
||||
`
|
||||
);
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/eslint.config.js', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"module.exports = [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { '@angular-eslint/prefer-standalone': ['error'] },
|
||||
},
|
||||
];
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
it('should not disable @angular-eslint/prefer-standalone when there are multiple overrides for angular eslint and the rule is set in one of them', async () => {
|
||||
tree.write('eslint.config.js', 'module.exports = [];');
|
||||
tree.write(
|
||||
'apps/app1/eslint.config.js',
|
||||
`module.exports = [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: {
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{ type: 'attribute', prefix: 'app', style: 'camelCase' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { '@angular-eslint/prefer-standalone': ['error'] },
|
||||
},
|
||||
];
|
||||
`
|
||||
);
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/eslint.config.js', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"module.exports = [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: {
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{ type: 'attribute', prefix: 'app', style: 'camelCase' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { '@angular-eslint/prefer-standalone': ['error'] },
|
||||
},
|
||||
];
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
it('should disable @angular-eslint/prefer-standalone in an existing override for angular eslint', async () => {
|
||||
tree.write('eslint.config.js', 'module.exports = [];');
|
||||
tree.write(
|
||||
'apps/app1/eslint.config.js',
|
||||
`module.exports = [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { 'no-unused-vars': 'error' },
|
||||
},
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: {
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{ type: 'attribute', prefix: 'app', style: 'camelCase' },
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
`
|
||||
);
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/eslint.config.js', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"module.exports = [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { 'no-unused-vars': 'error' },
|
||||
},
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
rules: {
|
||||
'@angular-eslint/directive-selector': [
|
||||
'error',
|
||||
{
|
||||
type: 'attribute',
|
||||
prefix: 'app',
|
||||
style: 'camelCase',
|
||||
},
|
||||
],
|
||||
'@angular-eslint/prefer-standalone': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
it('should disable @angular-eslint/prefer-standalone in an existing override for ts files', async () => {
|
||||
tree.write('eslint.config.js', 'module.exports = [];');
|
||||
tree.write(
|
||||
'apps/app1/eslint.config.js',
|
||||
`module.exports = [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
rules: { 'no-unused-vars': 'error' },
|
||||
},
|
||||
];
|
||||
`
|
||||
);
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/eslint.config.js', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"module.exports = [
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
rules: {
|
||||
'no-unused-vars': 'error',
|
||||
'@angular-eslint/prefer-standalone': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
it('should disable @angular-eslint/prefer-standalone in a new override', async () => {
|
||||
tree.write('eslint.config.js', 'module.exports = [];');
|
||||
tree.write(
|
||||
'apps/app1/eslint.config.js',
|
||||
`module.exports = [
|
||||
{
|
||||
files: ['*.html'],
|
||||
rules: { 'some-rule-for-html': 'error' },
|
||||
},
|
||||
];
|
||||
`
|
||||
);
|
||||
|
||||
await migration(tree);
|
||||
|
||||
expect(tree.read('apps/app1/eslint.config.js', 'utf8'))
|
||||
.toMatchInlineSnapshot(`
|
||||
"module.exports = [
|
||||
{
|
||||
files: ['*.html'],
|
||||
rules: { 'some-rule-for-html': 'error' },
|
||||
},
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
rules: {
|
||||
'@angular-eslint/prefer-standalone': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,24 @@
|
||||
#### Migrate Module Federation Imports to New Package
|
||||
|
||||
Update the ModuleFederationConfig imports to use @nx/module-federation.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update import paths for ModuleFederationConfig.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```js {% fileName="apps/shell/webpack.config.js" %}
|
||||
import { ModuleFederationConfig } from '@nx/webpack';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```js {% fileName="apps/shell/webpack.config.js" %}
|
||||
import { ModuleFederationConfig } from '@nx/module-federation';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,30 @@
|
||||
#### Migrate withModuleFederation Import to New Package
|
||||
|
||||
Update the withModuleFederation import to use @nx/module-federation/webpack.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update import paths for `withModuleFederation` and `withModuleFederationForSSR`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```ts {% fileName="apps/shell/webpack.config.ts" %}
|
||||
import {
|
||||
withModuleFederation,
|
||||
withModuleFederationForSSR,
|
||||
} from '@nx/angular/module-federation';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```ts {% fileName="apps/shell/webpack.config.ts" %}
|
||||
import {
|
||||
withModuleFederation,
|
||||
withModuleFederationForSSR,
|
||||
} from '@nx/module-federation/angular';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,42 @@
|
||||
#### Remove Angular ESLint Rules
|
||||
|
||||
Remove Angular ESLint rules that were removed in v19.0.0.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Removes `@angular-eslint/no-host-metadata-property`, `@angular-eslint/sort-ngmodule-metadata-arrays` and `@angular-eslint/prefer-standalone-component` from any ESLint config file. Files to be searched include `.eslintrc.json`, `.eslintrc.base.json`, `.eslint.config.js` and `.eslint.config.base.js`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="apps/app1/.eslintrc.json" %}
|
||||
{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {
|
||||
"@angular-eslint/no-host-metadata-property": ["error"],
|
||||
"@angular-eslint/sort-ngmodule-metadata-arrays": ["error"],
|
||||
"@angular-eslint/prefer-standalone-component": ["error"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="apps/app1/.eslintrc.json" %}
|
||||
{
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,79 @@
|
||||
#### Remove tailwindConfig from ng-packagr Executors
|
||||
|
||||
Remove the deprecated 'tailwindConfig' option from ng-packagr executors. Tailwind CSS configurations located at the project or workspace root will be picked up automatically.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Remove `tailwindConfig` from the `@nx/angular:ng-packagr-lite` or `@nx/angular:package` executor options in project configuration.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="libs/my-lib/project.json" %}
|
||||
{
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/angular:ng-packagr-lite",
|
||||
"options": {
|
||||
"project": "libs/lib1/ng-package.json",
|
||||
"tailwindConfig": "libs/lib1/tailwind.config.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="libs/my-lib/project.json" %}
|
||||
{
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/angular:ng-packagr-lite",
|
||||
"options": {
|
||||
"project": "libs/lib1/ng-package.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
Remove `tailwindConfig` from the `@nx/angular:ng-packagr-lite` or `@nx/angular:package` executor target defaults in `nx.json`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"targetDefaults": {
|
||||
"@nx/angular:ng-packagr-lite": {
|
||||
"options": {
|
||||
"project": "{projectRoot}/ng-package.json",
|
||||
"tailwindConfig": "{projectRoot}/tailwind.config.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"targetDefaults": {
|
||||
"@nx/angular:ng-packagr-lite": {
|
||||
"options": {
|
||||
"project": "{projectRoot}/ng-package.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,59 @@
|
||||
#### Update `@angular/cli` to `~19.0.0`
|
||||
|
||||
Update the version of the Angular CLI if it is specified in `package.json`
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update in `devDependencies`:
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```{% fileName="package.json" %}
|
||||
{
|
||||
"devDependencies": {
|
||||
"@angular/cli": "~13.3.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```{% fileName="package.json" %}
|
||||
{
|
||||
"devDependencies": {
|
||||
"@angular/cli": "~19.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
Update in `dependencies`:
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```{% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {
|
||||
"@angular/cli": "~13.3.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```{% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {
|
||||
"@angular/cli": "~19.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,32 @@
|
||||
#### Update Angular SSR Imports to Use Node Entry Point
|
||||
|
||||
Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update import paths for SSR CommonEngine properties to use `@angular/ssr/node`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```ts {% fileName="apps/app1/server.ts" %}
|
||||
import { CommonEngine } from '@angular/ssr';
|
||||
import type {
|
||||
CommonEngineOptions,
|
||||
CommonEngineRenderOptions,
|
||||
} from '@angular/ssr';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```ts {% fileName="apps/app1/server.ts" %}
|
||||
import { CommonEngine } from '@angular/ssr/node';
|
||||
import type {
|
||||
CommonEngineOptions,
|
||||
CommonEngineRenderOptions,
|
||||
} from '@angular/ssr/node';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,28 @@
|
||||
#### Ensure the @nx/module-federation Package is Installed
|
||||
|
||||
If workspace includes Module Federation projects, ensure the new `@nx/module-federation` package is installed.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {
|
||||
"@nx/module-federation": "20.3.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,59 @@
|
||||
#### Update `@angular/cli` to `~19.1.0`
|
||||
|
||||
Update the version of the Angular CLI if it is specified in `package.json`
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update in `devDependencies`:
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```{% fileName="package.json" %}
|
||||
{
|
||||
"devDependencies": {
|
||||
"@angular/cli": "~13.3.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```{% fileName="package.json" %}
|
||||
{
|
||||
"devDependencies": {
|
||||
"@angular/cli": "~19.1.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
Update in `dependencies`:
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```{% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {
|
||||
"@angular/cli": "~13.3.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```{% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {
|
||||
"@angular/cli": "~19.1.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,38 @@
|
||||
#### Update TypeScript ESLint to v8.13.0
|
||||
|
||||
Update TypeScript ESLint packages to v8.13.0 if they are already on v8
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
This migration will update `typescript-eslint`, `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser` and `@typescript-eslint/utils` to `8.13.0` if they are between version `8.0.0` and `8.13.0`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="package.json" %}
|
||||
{
|
||||
"devDependencies": {
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"@typescript-eslint/utils": "^8.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="package.json" %}
|
||||
{
|
||||
"devDependencies": {
|
||||
"typescript-eslint": "^8.13.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.13.0",
|
||||
"@typescript-eslint/parser": "^8.13.0",
|
||||
"@typescript-eslint/utils": "^8.13.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,88 @@
|
||||
#### Update ESLint Config File Extensions in Overrides
|
||||
|
||||
Update ESLint flat config to include .cjs, .mjs, .cts, and .mts files in overrides (if needed)
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Add `.cjs`, `.mjs`, `.cts`, `.mts` file extensions to overrides converted using `convert-to-flat-config`
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```js {% fileName="eslint.config.js" %}
|
||||
const { FlatCompat } = require('@eslint/eslintrc');
|
||||
const js = require('@eslint/js');
|
||||
const nxEslintPlugin = require('@nx/eslint-plugin');
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
...compat
|
||||
.config({
|
||||
extends: ['plugin:@nx/typescript'],
|
||||
})
|
||||
.map((config) => ({
|
||||
...config,
|
||||
files: ['**/*.ts', '**/*.tsx'],
|
||||
rules: {
|
||||
...config.rules,
|
||||
},
|
||||
})),
|
||||
...compat
|
||||
.config({
|
||||
extends: ['plugin:@nx/javascript'],
|
||||
})
|
||||
.map((config) => ({
|
||||
...config,
|
||||
files: ['**/*.js', '**/*.jsx'],
|
||||
rules: {
|
||||
...config.rules,
|
||||
},
|
||||
})),
|
||||
];
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```js {% highlightLines=[17,28] fileName="eslint.config.js" %}
|
||||
const { FlatCompat } = require('@eslint/eslintrc');
|
||||
const js = require('@eslint/js');
|
||||
const nxEslintPlugin = require('@nx/eslint-plugin');
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
...compat
|
||||
.config({
|
||||
extends: ['plugin:@nx/typescript'],
|
||||
})
|
||||
.map((config) => ({
|
||||
...config,
|
||||
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
|
||||
rules: {
|
||||
...config.rules,
|
||||
},
|
||||
})),
|
||||
...compat
|
||||
.config({
|
||||
extends: ['plugin:@nx/javascript'],
|
||||
})
|
||||
.map((config) => ({
|
||||
...config,
|
||||
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
|
||||
rules: {
|
||||
...config.rules,
|
||||
},
|
||||
})),
|
||||
];
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,35 @@
|
||||
#### Add includeSubprojectsTasks to build.gradle File
|
||||
|
||||
Add includeSubprojectsTasks to build.gradle file
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update import paths for `withModuleFederation` and `withModuleFederationForSSR`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"plugins": ["@nx/gradle"]
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% highlightLines=[5] fileName="nx.json" %}
|
||||
{
|
||||
"plugins": [
|
||||
{
|
||||
"options": {
|
||||
"includeSubprojectsTasks": true
|
||||
},
|
||||
"plugin": "@nx/gradle"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,30 @@
|
||||
#### Replace getJestProjects with getJestProjectsAsync
|
||||
|
||||
Replace getJestProjects with getJestProjectsAsync
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```ts {% fileName="jest.config.ts" %}
|
||||
import { getJestProjects } from '@nx/jest';
|
||||
|
||||
export default {
|
||||
projects: getJestProjects(),
|
||||
};
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```ts {% fileName="jest.config.ts" %}
|
||||
import { getJestProjectsAsync } from '@nx/jest';
|
||||
|
||||
export default async () => ({
|
||||
projects: await getJestProjectsAsync(),
|
||||
});
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,32 @@
|
||||
#### Move useDaemonProcess
|
||||
|
||||
Move the `useDaemonProcess` to the root of `nx.json`
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"useDaemonProcess": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"useDaemonProcess": false
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
29
packages/nx/src/migrations/update-20-0-1/use-legacy-cache.md
Normal file
29
packages/nx/src/migrations/update-20-0-1/use-legacy-cache.md
Normal file
@ -0,0 +1,29 @@
|
||||
#### Use Legacy Cache
|
||||
|
||||
Set `useLegacyCache` to true for migrating workspaces
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Add `useLegacyCache` to `nx.json` unless `enableDbCache` was set to true.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"targetDefaults": {}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"targetDefaults": {},
|
||||
"useLegacyCache": true
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,41 @@
|
||||
#### Add Module Federation Env Var to Target Defaults
|
||||
|
||||
Add NX_MF_DEV_REMOTES to inputs for task hashing when `@nx/webpack:webpack` or `@nx/rspack:rspack` is used for Module Federation.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"targetDefaults": {
|
||||
"@nx/webpack:webpack": {
|
||||
"inputs": ["^build"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% highlightLines=[4,5,6] fileName="nx.json" %}
|
||||
{
|
||||
"targetDefaults": {
|
||||
"@nx/webpack:webpack": {
|
||||
"cache": true,
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": [
|
||||
"^build",
|
||||
{
|
||||
"env": "NX_MF_DEV_REMOTES"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,32 @@
|
||||
#### Migrate Module Federation Imports to New Package
|
||||
|
||||
Update the ModuleFederationConfig imports to use @nx/module-federation.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update import paths for ModuleFederationConfig.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```js {% fileName="apps/shell/webpack.config.js" %}
|
||||
import { ModuleFederationConfig } from '@nx/webpack';
|
||||
```
|
||||
|
||||
```js {% fileName="apps/shell/rspack.config.js" %}
|
||||
import { ModuleFederationConfig } from '@nx/rspack/module-federation';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```js {% fileName="apps/shell/webpack.config.js" %}
|
||||
import { ModuleFederationConfig } from '@nx/module-federation';
|
||||
```
|
||||
|
||||
```js {% fileName="apps/shell/rspack.config.js" %}
|
||||
import { ModuleFederationConfig } from '@nx/module-federation';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,30 @@
|
||||
#### Migrate withModuleFederation Import to New Package
|
||||
|
||||
Update the withModuleFederation import to use @nx/module-federation/webpack.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update import paths for `withModuleFederation` and `withModuleFederationForSSR`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```ts {% fileName="apps/shell/webpack.config.ts" %}
|
||||
import {
|
||||
withModuleFederation,
|
||||
withModuleFederationForSSR,
|
||||
} from '@nx/react/module-federation';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```ts {% fileName="apps/shell/webpack.config.ts" %}
|
||||
import {
|
||||
withModuleFederation,
|
||||
withModuleFederationForSSR,
|
||||
} from '@nx/module-federation/webpack';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,28 @@
|
||||
#### Ensure the @nx/module-federation Package is Installed
|
||||
|
||||
If workspace includes Module Federation projects, ensure the new `@nx/module-federation` package is installed.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {
|
||||
"@nx/module-federation": "20.3.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,30 @@
|
||||
#### Migrate withModuleFederation Import to New Package
|
||||
|
||||
Update the withModuleFederation import to use @nx/module-federation/rspack.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Update import paths for `withModuleFederation` and `withModuleFederationForSSR`.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```ts {% fileName="apps/shell/rspack.config.ts" %}
|
||||
import {
|
||||
withModuleFederation,
|
||||
withModuleFederationForSSR,
|
||||
} from '@nx/rspack/module-federation';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```ts {% fileName="apps/shell/rspack.config.ts" %}
|
||||
import {
|
||||
withModuleFederation,
|
||||
withModuleFederationForSSR,
|
||||
} from '@nx/module-federation/rspack';
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,28 @@
|
||||
#### Ensure the @nx/module-federation Package is Installed
|
||||
|
||||
If workspace includes Module Federation projects, ensure the new `@nx/module-federation` package is installed.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Before" %}
|
||||
|
||||
```json {% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="After" %}
|
||||
|
||||
```json {% fileName="package.json" %}
|
||||
{
|
||||
"dependencies": {
|
||||
"@nx/module-federation": "20.3.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
@ -0,0 +1,12 @@
|
||||
#### Add Vite Temp Files to Git Ignore
|
||||
|
||||
Add gitignore entry for temporary vite config files.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Adds the following entries to the `.gitignore` file.
|
||||
|
||||
```text {% fileName=".gitignore" %}
|
||||
vite.config.*.timestamp*
|
||||
vitest.config.*.timestamp*
|
||||
```
|
||||
@ -0,0 +1,12 @@
|
||||
#### Add Vitest Temp Files to Git Ignore
|
||||
|
||||
Add gitignore entry for temporary vitest config files.
|
||||
|
||||
#### Sample Code Changes
|
||||
|
||||
Adds the following entries to the `.gitignore` file.
|
||||
|
||||
```text {% fileName=".gitignore" %}
|
||||
vite.config.*.timestamp*
|
||||
vitest.config.*.timestamp*
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user