@nx/webpack 23.0.0-beta.7 → 23.0.0-beta.9
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 +4 -4
- package/src/executors/dev-server/dev-server.impl.d.ts.map +1 -1
- package/src/executors/dev-server/dev-server.impl.js +2 -0
- package/src/executors/dev-server/schema.json +1 -0
- package/src/executors/webpack/schema.json +1 -0
- package/src/executors/webpack/webpack.impl.d.ts.map +1 -1
- package/src/executors/webpack/webpack.impl.js +2 -0
- package/src/generators/configuration/configuration.d.ts.map +1 -1
- package/src/generators/configuration/configuration.js +2 -0
- package/src/utils/deprecation.d.ts +6 -0
- package/src/utils/deprecation.d.ts.map +1 -0
- package/src/utils/deprecation.js +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.9",
|
|
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.
|
|
69
|
-
"@nx/js": "23.0.0-beta.
|
|
68
|
+
"@nx/devkit": "23.0.0-beta.9",
|
|
69
|
+
"@nx/js": "23.0.0-beta.9"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"nx": "23.0.0-beta.
|
|
72
|
+
"nx": "23.0.0-beta.9"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EAGhB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EAGhB,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAuB,iBAAiB,CACtC,YAAY,EAAE,mBAAmB,EACjC,OAAO,EAAE,eAAe;;;aAsGzB;AA0BD,eAAe,iBAAiB,CAAC"}
|
|
@@ -11,10 +11,12 @@ const get_dev_server_config_1 = require("./lib/get-dev-server-config");
|
|
|
11
11
|
const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
12
12
|
const run_webpack_1 = require("../../utils/run-webpack");
|
|
13
13
|
const resolve_user_defined_webpack_config_1 = require("../../utils/webpack/resolve-user-defined-webpack-config");
|
|
14
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
14
15
|
const normalize_options_1 = require("../webpack/lib/normalize-options");
|
|
15
16
|
const config_1 = require("../../utils/config");
|
|
16
17
|
const js_1 = require("@nx/js");
|
|
17
18
|
async function* devServerExecutor(serveOptions, context) {
|
|
19
|
+
(0, deprecation_1.warnWebpackDevServerExecutorDeprecation)();
|
|
18
20
|
// Default to dev mode so builds are faster and HMR mode works better.
|
|
19
21
|
process.env.NODE_ENV ??= 'development';
|
|
20
22
|
const { root: projectRoot, sourceRoot } = context.projectsConfigurations.projects[context.projectName];
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"description": "Serve an application using webpack.",
|
|
7
7
|
"cli": "nx",
|
|
8
8
|
"type": "object",
|
|
9
|
+
"x-deprecated": "The `@nx/webpack:dev-server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` to migrate to the `@nx/webpack/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
9
10
|
"properties": {
|
|
10
11
|
"buildTarget": {
|
|
11
12
|
"type": "string",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"description": "Build a project using webpack.",
|
|
6
6
|
"cli": "nx",
|
|
7
7
|
"type": "object",
|
|
8
|
+
"x-deprecated": "The `@nx/webpack:webpack` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` to migrate to the `@nx/webpack/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
8
9
|
"properties": {
|
|
9
10
|
"crossOrigin": {
|
|
10
11
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/webpack/webpack.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"webpack.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/webpack/webpack.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAkBpB,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,UAAU,CAAC;AA6ClB,MAAM,MAAM,oBAAoB,GAC5B;IACE,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,GACD;IACE,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,CAAC;AAEN,wBAAuB,eAAe,CACpC,QAAQ,EAAE,sBAAsB,EAChC,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,SAAS,CAAC,CA+FvE;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -10,6 +10,7 @@ const rxjs_1 = require("rxjs");
|
|
|
10
10
|
const operators_1 = require("rxjs/operators");
|
|
11
11
|
const config_1 = require("../../utils/config");
|
|
12
12
|
const resolve_user_defined_webpack_config_1 = require("../../utils/webpack/resolve-user-defined-webpack-config");
|
|
13
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
13
14
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
14
15
|
const run_webpack_1 = require("./lib/run-webpack");
|
|
15
16
|
async function getWebpackConfigs(options, context) {
|
|
@@ -46,6 +47,7 @@ async function getWebpackConfigs(options, context) {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
async function* webpackExecutor(_options, context) {
|
|
50
|
+
(0, deprecation_1.warnWebpackExecutorDeprecation)();
|
|
49
51
|
// Default to production build.
|
|
50
52
|
process.env['NODE_ENV'] ||= 'production';
|
|
51
53
|
const metadata = context.projectsConfigurations.projects[context.projectName];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAOxD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,8BAGtC;AAED,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,8BAqCtC;AA6LD,eAAe,sBAAsB,CAAC"}
|
|
@@ -6,6 +6,7 @@ const internal_1 = require("@nx/devkit/internal");
|
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
7
|
const init_1 = require("../init/init");
|
|
8
8
|
const has_plugin_1 = require("../../utils/has-plugin");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
9
10
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
10
11
|
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
11
12
|
function configurationGenerator(tree, options) {
|
|
@@ -28,6 +29,7 @@ async function configurationGeneratorInternal(tree, options) {
|
|
|
28
29
|
tasks.push(depsTask);
|
|
29
30
|
checkForTargetConflicts(tree, options);
|
|
30
31
|
if (!(0, has_plugin_1.hasPlugin)(tree)) {
|
|
32
|
+
(0, deprecation_1.warnWebpackExecutorGenerating)();
|
|
31
33
|
addBuildTarget(tree, options);
|
|
32
34
|
if (options.devServer) {
|
|
33
35
|
addServeTarget(tree, options);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const WEBPACK_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/webpack:webpack` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` to migrate to the `@nx/webpack/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
|
|
2
|
+
export declare const WEBPACK_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/webpack:dev-server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` to migrate to the `@nx/webpack/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
|
|
3
|
+
export declare function warnWebpackExecutorDeprecation(): void;
|
|
4
|
+
export declare function warnWebpackDevServerExecutorDeprecation(): void;
|
|
5
|
+
export declare function warnWebpackExecutorGenerating(): void;
|
|
6
|
+
//# sourceMappingURL=deprecation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../../../../packages/webpack/src/utils/deprecation.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oCAAoC,uQACqN,CAAC;AAEvQ,eAAO,MAAM,+CAA+C,0QAC6M,CAAC;AAE1Q,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAED,wBAAgB,uCAAuC,IAAI,IAAI,CAE9D;AAMD,wBAAgB,6BAA6B,IAAI,IAAI,CAIpD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WEBPACK_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = exports.WEBPACK_EXECUTOR_DEPRECATION_MESSAGE = void 0;
|
|
4
|
+
exports.warnWebpackExecutorDeprecation = warnWebpackExecutorDeprecation;
|
|
5
|
+
exports.warnWebpackDevServerExecutorDeprecation = warnWebpackDevServerExecutorDeprecation;
|
|
6
|
+
exports.warnWebpackExecutorGenerating = warnWebpackExecutorGenerating;
|
|
7
|
+
const devkit_1 = require("@nx/devkit");
|
|
8
|
+
// TODO(v24): Remove the @nx/webpack:webpack and @nx/webpack:dev-server
|
|
9
|
+
// executors. The inferred plugin (@nx/webpack/plugin) and the
|
|
10
|
+
// convert-to-inferred generator stay supported.
|
|
11
|
+
exports.WEBPACK_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/webpack:webpack` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` to migrate to the `@nx/webpack/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
|
|
12
|
+
exports.WEBPACK_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/webpack:dev-server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` to migrate to the `@nx/webpack/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
|
|
13
|
+
function warnWebpackExecutorDeprecation() {
|
|
14
|
+
devkit_1.logger.warn(exports.WEBPACK_EXECUTOR_DEPRECATION_MESSAGE);
|
|
15
|
+
}
|
|
16
|
+
function warnWebpackDevServerExecutorDeprecation() {
|
|
17
|
+
devkit_1.logger.warn(exports.WEBPACK_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE);
|
|
18
|
+
}
|
|
19
|
+
// Fired when the @nx/webpack:configuration generator is about to generate
|
|
20
|
+
// targets that use the deprecated executors — i.e. when @nx/webpack/plugin
|
|
21
|
+
// isn't registered in nx.json. Surfaces the deprecation at generation time
|
|
22
|
+
// rather than only when the user later runs the generated targets.
|
|
23
|
+
function warnWebpackExecutorGenerating() {
|
|
24
|
+
devkit_1.logger.warn('Generating targets that use the deprecated `@nx/webpack:webpack` and `@nx/webpack:dev-server` executors. These executors will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` next to migrate these targets to the `@nx/webpack/plugin` inferred plugin and prevent future generators from emitting executor targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.');
|
|
25
|
+
}
|