@nx/webpack 16.6.0-beta.0 → 16.6.0-beta.2

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": "16.6.0-beta.0",
3
+ "version": "16.6.0-beta.2",
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": {
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/core": "^7.15.0",
33
- "@nrwl/webpack": "16.6.0-beta.0",
34
- "@nx/devkit": "16.6.0-beta.0",
35
- "@nx/js": "16.6.0-beta.0",
33
+ "@nrwl/webpack": "16.6.0-beta.2",
34
+ "@nx/devkit": "16.6.0-beta.2",
35
+ "@nx/js": "16.6.0-beta.2",
36
36
  "autoprefixer": "^10.4.9",
37
37
  "babel-loader": "^9.1.2",
38
38
  "browserslist": "^4.21.4",
@@ -62,8 +62,6 @@
62
62
  "stylus-loader": "^7.1.0",
63
63
  "terser-webpack-plugin": "^5.3.3",
64
64
  "ts-loader": "^9.3.1",
65
- "ts-node": "10.9.1",
66
- "tsconfig-paths": "^4.1.2",
67
65
  "tsconfig-paths-webpack-plugin": "4.0.0",
68
66
  "tslib": "^2.3.0",
69
67
  "webpack": "^5.80.0",
@@ -75,5 +73,5 @@
75
73
  "access": "public"
76
74
  },
77
75
  "types": "./index.d.ts",
78
- "gitHead": "5a7ffb93c9e84bffbf52f6ae9c6c1e3b8edb9d35"
76
+ "gitHead": "c3d31711b71d648cedeff688fce9334d393b586b"
79
77
  }
@@ -78,6 +78,10 @@ function webpackExecutor(_options, context) {
78
78
  if (options.deleteOutputPath) {
79
79
  (0, fs_1.deleteOutputDir)(context.root, options.outputPath);
80
80
  }
81
+ if (options.generatePackageJson && metadata.projectType !== 'application') {
82
+ devkit_1.logger.warn((0, devkit_1.stripIndents) `The project ${context.projectName} is using the 'generatePackageJson' option which is deprecated for library projects. It should only be used for applications.
83
+ For libraries, configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/packages/eslint-plugin/documents/dependency-checks).`);
84
+ }
81
85
  const configs = yield tslib_1.__await(getWebpackConfigs(options, context));
82
86
  return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.of)(configs).pipe((0, operators_1.mergeMap)((config) => (Array.isArray(config) ? (0, rxjs_1.from)(config) : (0, rxjs_1.of)(config))),
83
87
  // Run build sequentially and bail when first one fails.
@@ -1,3 +1,2 @@
1
- export declare function tsNodeRegister(file?: string, tsConfig?: string): void;
2
1
  export declare function resolveCustomWebpackConfig(path: string, tsConfig: string): any;
3
2
  export declare function isRegistered(): boolean;
@@ -1,30 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isRegistered = exports.resolveCustomWebpackConfig = exports.tsNodeRegister = void 0;
4
- function tsNodeRegister(file = '', tsConfig) {
5
- if (!(file === null || file === void 0 ? void 0 : file.endsWith('.ts')))
6
- return;
7
- // Avoid double-registering which can lead to issues type-checking already transformed files.
8
- if (isRegistered())
9
- return;
10
- // Register TS compiler lazily
11
- require('ts-node').register({
12
- project: tsConfig,
13
- compilerOptions: {
14
- module: 'CommonJS',
15
- types: ['node'],
16
- },
17
- });
18
- // Register paths in tsConfig
19
- const tsconfigPaths = require('tsconfig-paths');
20
- const { absoluteBaseUrl: baseUrl, paths } = tsconfigPaths.loadConfig(tsConfig);
21
- if (baseUrl && paths) {
22
- tsconfigPaths.register({ baseUrl, paths });
23
- }
24
- }
25
- exports.tsNodeRegister = tsNodeRegister;
3
+ exports.isRegistered = exports.resolveCustomWebpackConfig = void 0;
4
+ const tsnode_register_1 = require("@nx/js/src/utils/typescript/tsnode-register");
26
5
  function resolveCustomWebpackConfig(path, tsConfig) {
27
- tsNodeRegister(path, tsConfig);
6
+ (0, tsnode_register_1.tsNodeRegister)(path, tsConfig);
28
7
  const customWebpackConfig = require(path);
29
8
  // If the user provides a configuration in TS file
30
9
  // then there are 2 cases for exporing an object. The first one is: