@nx/webpack 16.5.1 → 16.6.0-beta.1
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/generators.json +8 -6
- package/index.d.ts +4 -1
- package/index.js +6 -1
- package/package.json +5 -5
- package/src/executors/webpack/webpack.impl.js +4 -0
- package/src/generators/configuration/configuration.d.ts +5 -0
- package/src/generators/{webpack-project/webpack-project.js → configuration/configuration.js} +5 -5
- package/src/generators/{webpack-project → configuration}/schema.d.ts +1 -1
- package/src/generators/webpack-project/webpack-project.d.ts +0 -5
- /package/src/generators/{webpack-project → configuration}/schema.json +0 -0
package/generators.json
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
"description": "Initialize the `@nrwl/webpack` plugin.",
|
|
9
9
|
"hidden": true
|
|
10
10
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
11
|
+
"configuration": {
|
|
12
|
+
"aliases": ["webpack-project"],
|
|
13
|
+
"factory": "./src/generators/configuration/configuration#compat",
|
|
14
|
+
"schema": "./src/generators/configuration/schema.json",
|
|
14
15
|
"description": "Add webpack configuration to a project.",
|
|
15
16
|
"hidden": true
|
|
16
17
|
}
|
|
@@ -23,9 +24,10 @@
|
|
|
23
24
|
"aliases": ["ng-add"],
|
|
24
25
|
"hidden": true
|
|
25
26
|
},
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"configuration": {
|
|
28
|
+
"aliases": ["webpack-project"],
|
|
29
|
+
"factory": "./src/generators/configuration/configuration",
|
|
30
|
+
"schema": "./src/generators/configuration/schema.json",
|
|
29
31
|
"description": "Add webpack configuration to a project.",
|
|
30
32
|
"hidden": true
|
|
31
33
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { configurationGenerator } from './src/generators/configuration/configuration';
|
|
2
|
+
export { configurationGenerator };
|
|
3
|
+
/** @deprecated Use `configurationGenerator` instead. */
|
|
4
|
+
export declare const webpackProjectGenerator: typeof configurationGenerator;
|
|
1
5
|
export * from './src/utils/create-copy-plugin';
|
|
2
6
|
export * from './src/utils/config';
|
|
3
7
|
export * from './src/generators/init/init';
|
|
4
|
-
export * from './src/generators/webpack-project/webpack-project';
|
|
5
8
|
export type { WebDevServerOptions } from './src/executors/dev-server/schema';
|
|
6
9
|
export * from './src/executors/dev-server/dev-server.impl';
|
|
7
10
|
export * from './src/executors/webpack/lib/normalize-options';
|
package/index.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webpackProjectGenerator = exports.configurationGenerator = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const configuration_1 = require("./src/generators/configuration/configuration");
|
|
6
|
+
Object.defineProperty(exports, "configurationGenerator", { enumerable: true, get: function () { return configuration_1.configurationGenerator; } });
|
|
7
|
+
// Exported for backwards compatibility in case a plugin is using the old name.
|
|
8
|
+
/** @deprecated Use `configurationGenerator` instead. */
|
|
9
|
+
exports.webpackProjectGenerator = configuration_1.configurationGenerator;
|
|
4
10
|
tslib_1.__exportStar(require("./src/utils/create-copy-plugin"), exports);
|
|
5
11
|
tslib_1.__exportStar(require("./src/utils/config"), exports);
|
|
6
12
|
tslib_1.__exportStar(require("./src/generators/init/init"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./src/generators/webpack-project/webpack-project"), exports);
|
|
8
13
|
tslib_1.__exportStar(require("./src/executors/dev-server/dev-server.impl"), exports);
|
|
9
14
|
tslib_1.__exportStar(require("./src/executors/webpack/lib/normalize-options"), exports);
|
|
10
15
|
tslib_1.__exportStar(require("./src/executors/webpack/webpack.impl"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.6.0-beta.1",
|
|
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.
|
|
34
|
-
"@nx/devkit": "16.
|
|
35
|
-
"@nx/js": "16.
|
|
33
|
+
"@nrwl/webpack": "16.6.0-beta.1",
|
|
34
|
+
"@nx/devkit": "16.6.0-beta.1",
|
|
35
|
+
"@nx/js": "16.6.0-beta.1",
|
|
36
36
|
"autoprefixer": "^10.4.9",
|
|
37
37
|
"babel-loader": "^9.1.2",
|
|
38
38
|
"browserslist": "^4.21.4",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
77
|
"types": "./index.d.ts",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "cf9f5cbe6a7ce3b916ec6505dc8488f669cbc52b"
|
|
79
79
|
}
|
|
@@ -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.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Tree } from '@nx/devkit';
|
|
2
|
+
import { ConfigurationGeneratorSchema } from './schema';
|
|
3
|
+
export declare function configurationGenerator(tree: Tree, options: ConfigurationGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
4
|
+
export default configurationGenerator;
|
|
5
|
+
export declare const compat: (generatorOptions: ConfigurationGeneratorSchema) => (tree: any, context: any) => Promise<any>;
|
package/src/generators/{webpack-project/webpack-project.js → configuration/configuration.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.compat = exports.configurationGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const init_1 = require("../init/init");
|
|
7
|
-
function
|
|
7
|
+
function configurationGenerator(tree, options) {
|
|
8
8
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
9
|
const task = yield (0, init_1.webpackInitGenerator)(tree, Object.assign(Object.assign({}, options), { skipFormat: true }));
|
|
10
10
|
checkForTargetConflicts(tree, options);
|
|
@@ -18,7 +18,7 @@ function webpackProjectGenerator(tree, options) {
|
|
|
18
18
|
return task;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
exports.
|
|
21
|
+
exports.configurationGenerator = configurationGenerator;
|
|
22
22
|
function checkForTargetConflicts(tree, options) {
|
|
23
23
|
var _a, _b;
|
|
24
24
|
if (options.skipValidation)
|
|
@@ -109,5 +109,5 @@ function addServeTarget(tree, options) {
|
|
|
109
109
|
},
|
|
110
110
|
} }) }));
|
|
111
111
|
}
|
|
112
|
-
exports.default =
|
|
113
|
-
exports.
|
|
112
|
+
exports.default = configurationGenerator;
|
|
113
|
+
exports.compat = (0, devkit_1.convertNxGenerator)(configurationGenerator);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import { WebpackProjectGeneratorSchema } from './schema';
|
|
3
|
-
export declare function webpackProjectGenerator(tree: Tree, options: WebpackProjectGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
4
|
-
export default webpackProjectGenerator;
|
|
5
|
-
export declare const webpackProjectSchematic: (generatorOptions: WebpackProjectGeneratorSchema) => (tree: any, context: any) => Promise<any>;
|
|
File without changes
|