@nx/webpack 17.3.0-beta.6 → 17.3.0-beta.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/webpack",
3
- "version": "17.3.0-beta.6",
3
+ "version": "17.3.0-beta.8",
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": {
@@ -62,9 +62,9 @@
62
62
  "webpack-dev-server": "^4.9.3",
63
63
  "webpack-node-externals": "^3.0.0",
64
64
  "webpack-subresource-integrity": "^5.1.0",
65
- "@nx/devkit": "17.3.0-beta.6",
66
- "@nx/js": "17.3.0-beta.6",
67
- "@nrwl/webpack": "17.3.0-beta.6"
65
+ "@nx/devkit": "17.3.0-beta.8",
66
+ "@nx/js": "17.3.0-beta.8",
67
+ "@nrwl/webpack": "17.3.0-beta.8"
68
68
  },
69
69
  "publishConfig": {
70
70
  "access": "public"
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.webpackInitGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
+ const update_package_scripts_1 = require("@nx/devkit/src/utils/update-package-scripts");
6
+ const plugin_1 = require("../../plugins/plugin");
5
7
  const versions_1 = require("../../utils/versions");
6
8
  async function webpackInitGenerator(tree, schema) {
7
9
  const shouldAddPlugin = process.env.NX_PCV3 === 'true';
@@ -19,6 +21,9 @@ async function webpackInitGenerator(tree, schema) {
19
21
  }
20
22
  installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, schema.keepExistingVersions);
21
23
  }
24
+ if (schema.updatePackageScripts) {
25
+ await (0, update_package_scripts_1.updatePackageScripts)(tree, plugin_1.createNodes);
26
+ }
22
27
  if (!schema.skipFormat) {
23
28
  await (0, devkit_1.formatFiles)(tree);
24
29
  }
@@ -2,4 +2,5 @@ export interface Schema {
2
2
  skipFormat?: boolean;
3
3
  skipPackageJson?: boolean;
4
4
  keepExistingVersions?: boolean;
5
+ updatePackageScripts?: boolean;
5
6
  }
@@ -21,6 +21,12 @@
21
21
  "x-priority": "internal",
22
22
  "description": "Keep existing dependencies versions",
23
23
  "default": false
24
+ },
25
+ "updatePackageScripts": {
26
+ "type": "boolean",
27
+ "x-priority": "internal",
28
+ "description": "Update `package.json` scripts with inferred targets",
29
+ "default": false
24
30
  }
25
31
  },
26
32
  "required": []