@nx/webpack 23.0.0-beta.20 → 23.0.0-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/migrations.json CHANGED
@@ -4,7 +4,8 @@
4
4
  "cli": "nx",
5
5
  "version": "21.0.0-beta.11",
6
6
  "description": "Remove isolatedConfig option for @nx/webpack:webpack",
7
- "implementation": "./src/migrations/update-21-0-0/remove-isolated-config"
7
+ "implementation": "./src/migrations/update-21-0-0/remove-isolated-config",
8
+ "documentation": "./src/migrations/update-21-0-0/remove-isolated-config.md"
8
9
  },
9
10
  "update-22-0-0-remove-deprecated-options": {
10
11
  "cli": "nx",
@@ -16,7 +17,8 @@
16
17
  "cli": "nx",
17
18
  "version": "23.0.0-beta.10",
18
19
  "description": "Rewrites imports of NxTsconfigPathsWebpackPlugin from '@nx/webpack' to the sub-path '@nx/webpack/tsconfig-paths-plugin'.",
19
- "factory": "./src/migrations/update-23-0-0/remove-nx-tsconfig-paths-webpack-plugin-import"
20
+ "factory": "./src/migrations/update-23-0-0/remove-nx-tsconfig-paths-webpack-plugin-import",
21
+ "documentation": "./src/migrations/update-23-0-0/remove-nx-tsconfig-paths-webpack-plugin-import.md"
20
22
  }
21
23
  },
22
24
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/webpack",
3
- "version": "23.0.0-beta.20",
3
+ "version": "23.0.0-beta.22",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Webpack contains executors and generators that support building applications using Webpack.",
6
6
  "repository": {
@@ -65,11 +65,11 @@
65
65
  "webpack-dev-server": "^5.2.1",
66
66
  "webpack-node-externals": "^3.0.0",
67
67
  "webpack-subresource-integrity": "^5.1.0",
68
- "@nx/devkit": "23.0.0-beta.20",
69
- "@nx/js": "23.0.0-beta.20"
68
+ "@nx/devkit": "23.0.0-beta.22",
69
+ "@nx/js": "23.0.0-beta.22"
70
70
  },
71
71
  "devDependencies": {
72
- "nx": "23.0.0-beta.20"
72
+ "nx": "23.0.0-beta.22"
73
73
  },
74
74
  "publishConfig": {
75
75
  "access": "public"
@@ -0,0 +1,37 @@
1
+ #### Remove `isolatedConfig` option
2
+
3
+ The `isolatedConfig` option is no longer supported by the `@nx/webpack:webpack` executor. Previously, setting `isolatedConfig: false` allowed you to use the executor's built-in Webpack configuration.
4
+
5
+ If this option is set in `project.json`, then it will be removed in favor of an explicit `webpackConfig` file. The Webpack configuration file matches the previous built-in configuration of the `@nx/webpack:webpack` executor.
6
+
7
+ #### Sample Code Changes
8
+
9
+ ##### Before
10
+
11
+ ```json title="project.json"
12
+ {
13
+ "targets": {
14
+ "build": {
15
+ "executor": "@nx/webpack:webpack",
16
+ "options": {
17
+ "isolatedConfig": false
18
+ }
19
+ }
20
+ }
21
+ }
22
+ ```
23
+
24
+ ##### After
25
+
26
+ ```json title="project.json" {6}
27
+ {
28
+ "targets": {
29
+ "build": {
30
+ "executor": "@nx/webpack:webpack",
31
+ "options": {
32
+ "webpackConfig": "apps/myapp/webpack.config.js"
33
+ }
34
+ }
35
+ }
36
+ }
37
+ ```
@@ -0,0 +1,54 @@
1
+ #### Rewrite `NxTsconfigPathsWebpackPlugin` Imports to the `@nx/webpack/tsconfig-paths-plugin` Sub-path
2
+
3
+ The deprecated re-export of `NxTsconfigPathsWebpackPlugin` from `@nx/webpack` is removed in v23. The migration rewrites both ES module imports and CJS `require()` calls to use the `@nx/webpack/tsconfig-paths-plugin` sub-path. Imports that combine the deprecated symbol with other named imports are split into two declarations so the rest of the original import still resolves from `@nx/webpack`. Aliases (`as Plugin`, `: Plugin`) are preserved.
4
+
5
+ #### Sample Code Changes
6
+
7
+ ES module import.
8
+
9
+ ##### Before
10
+
11
+ ```ts title="apps/my-app/webpack.config.ts" {1}
12
+ import { NxTsconfigPathsWebpackPlugin } from '@nx/webpack';
13
+
14
+ export default { plugins: [new NxTsconfigPathsWebpackPlugin()] };
15
+ ```
16
+
17
+ ##### After
18
+
19
+ ```ts title="apps/my-app/webpack.config.ts"
20
+ import { NxTsconfigPathsWebpackPlugin } from '@nx/webpack/tsconfig-paths-plugin';
21
+
22
+ export default { plugins: [new NxTsconfigPathsWebpackPlugin()] };
23
+ ```
24
+
25
+ ES module import combined with other named imports.
26
+
27
+ ##### Before
28
+
29
+ ```ts title="apps/my-app/webpack.config.ts" {1}
30
+ import { NxTsconfigPathsWebpackPlugin, NxAppWebpackPlugin } from '@nx/webpack';
31
+ ```
32
+
33
+ ##### After
34
+
35
+ ```ts title="apps/my-app/webpack.config.ts"
36
+ import { NxTsconfigPathsWebpackPlugin } from '@nx/webpack/tsconfig-paths-plugin';
37
+ import { NxAppWebpackPlugin } from '@nx/webpack';
38
+ ```
39
+
40
+ CJS `require()`.
41
+
42
+ ##### Before
43
+
44
+ ```js title="apps/my-app/webpack.config.js" {1}
45
+ const { NxTsconfigPathsWebpackPlugin } = require('@nx/webpack');
46
+ ```
47
+
48
+ ##### After
49
+
50
+ ```js title="apps/my-app/webpack.config.js"
51
+ const {
52
+ NxTsconfigPathsWebpackPlugin,
53
+ } = require('@nx/webpack/tsconfig-paths-plugin');
54
+ ```