@nx/webpack 21.0.0-beta.8 → 21.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/migrations.json
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"update-17-2-1-webpack-config-setup": {
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"version": "17.2.1-beta.0",
|
|
6
|
-
"description": "Add webpack.config.js file when webpackConfig is not defined",
|
|
7
|
-
"implementation": "./src/migrations/update-17-2-1/webpack-config-setup"
|
|
8
|
-
},
|
|
9
3
|
"update-19-6-3-proxy-config": {
|
|
10
4
|
"cli": "nx",
|
|
11
5
|
"version": "19.6.3-beta.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "21.0.0-beta.
|
|
3
|
+
"version": "21.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": {
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"webpack-dev-server": "^5.2.1",
|
|
67
67
|
"webpack-node-externals": "^3.0.0",
|
|
68
68
|
"webpack-subresource-integrity": "^5.1.0",
|
|
69
|
-
"@nx/devkit": "21.0.0-beta.
|
|
70
|
-
"@nx/js": "21.0.0-beta.
|
|
69
|
+
"@nx/devkit": "21.0.0-beta.9",
|
|
70
|
+
"@nx/js": "21.0.0-beta.9"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = default_1;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
|
6
|
-
async function default_1(tree) {
|
|
7
|
-
const update = (options, projectName, targetName, configurationName) => {
|
|
8
|
-
// Only handle webpack config for default configuration
|
|
9
|
-
if (configurationName)
|
|
10
|
-
return;
|
|
11
|
-
const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
12
|
-
if (!options.webpackConfig && options.isolatedConfig !== false) {
|
|
13
|
-
options.webpackConfig = `${projectConfiguration.root}/webpack.config.js`;
|
|
14
|
-
tree.write(options.webpackConfig, `
|
|
15
|
-
const { composePlugins, withNx } = require('@nx/webpack');
|
|
16
|
-
|
|
17
|
-
// Nx plugins for webpack.
|
|
18
|
-
module.exports = composePlugins(withNx(), (config) => {
|
|
19
|
-
// Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
|
|
20
|
-
// See: https://nx.dev/recipes/webpack/webpack-config-setup
|
|
21
|
-
return config;
|
|
22
|
-
});
|
|
23
|
-
`);
|
|
24
|
-
projectConfiguration.targets[targetName].options = options;
|
|
25
|
-
(0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfiguration);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', update);
|
|
29
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/webpack:webpack', update);
|
|
30
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
31
|
-
}
|