@nx/webpack 23.3.0-pr.36958.5270397 → 23.3.0-pr.37036.f6e3fb2
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.
|
@@ -72,6 +72,12 @@ async function webpackInitGeneratorInternal(tree, schema) {
|
|
|
72
72
|
// The inferred plugin runs the `webpack-cli` binary.
|
|
73
73
|
devDependencies['webpack-cli'] = versions_1.webpackCliVersion;
|
|
74
74
|
}
|
|
75
|
+
// @nx/webpack depends on sass, which pulls in @parcel/watcher. Its install
|
|
76
|
+
// script only builds from source when npm_config_build_from_source is set,
|
|
77
|
+
// so skip it.
|
|
78
|
+
(0, internal_1.acknowledgeBuildScripts)(tree, (0, devkit_1.detectPackageManager)(tree.root), {
|
|
79
|
+
'@parcel/watcher': false,
|
|
80
|
+
});
|
|
75
81
|
installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies, undefined, schema.keepExistingVersions ?? true);
|
|
76
82
|
}
|
|
77
83
|
if (!schema.skipFormat) {
|
|
@@ -85,6 +85,15 @@ async function createWebpackTargets(configFilePath, projectRoot, options, contex
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
const targets = {};
|
|
88
|
+
const buildInputs = [
|
|
89
|
+
...('production' in namedInputs
|
|
90
|
+
? ['production', '^production']
|
|
91
|
+
: ['default', '^default']),
|
|
92
|
+
{
|
|
93
|
+
externalDependencies: ['webpack-cli'],
|
|
94
|
+
},
|
|
95
|
+
internal_2.TS_SOLUTION_SETUP_TSCONFIG_INPUT,
|
|
96
|
+
];
|
|
88
97
|
targets[options.buildTargetName] = {
|
|
89
98
|
command: `webpack-cli build`,
|
|
90
99
|
options: { cwd: projectRoot, env: { NODE_ENV: 'production' } },
|
|
@@ -96,13 +105,7 @@ async function createWebpackTargets(configFilePath, projectRoot, options, contex
|
|
|
96
105
|
cache: true,
|
|
97
106
|
dependsOn: [`^${options.buildTargetName}`],
|
|
98
107
|
inputs: [
|
|
99
|
-
...
|
|
100
|
-
? ['production', '^production']
|
|
101
|
-
: ['default', '^default']),
|
|
102
|
-
{
|
|
103
|
-
externalDependencies: ['webpack-cli'],
|
|
104
|
-
},
|
|
105
|
-
internal_2.TS_SOLUTION_SETUP_TSCONFIG_INPUT,
|
|
108
|
+
...buildInputs,
|
|
106
109
|
// The build can emit a pruned pnpm deploy output (NxAppWebpackPlugin
|
|
107
110
|
// with generatePackageJson), whose install settings come from these
|
|
108
111
|
// otherwise-unhashed root sources.
|
|
@@ -127,6 +130,7 @@ async function createWebpackTargets(configFilePath, projectRoot, options, contex
|
|
|
127
130
|
};
|
|
128
131
|
targets[options.serveTargetName] = {
|
|
129
132
|
continuous: true,
|
|
133
|
+
inputs: [...buildInputs],
|
|
130
134
|
command: `webpack-cli serve`,
|
|
131
135
|
options: {
|
|
132
136
|
cwd: projectRoot,
|
|
@@ -147,6 +151,7 @@ async function createWebpackTargets(configFilePath, projectRoot, options, contex
|
|
|
147
151
|
};
|
|
148
152
|
targets[options.previewTargetName] = {
|
|
149
153
|
continuous: true,
|
|
154
|
+
inputs: [...buildInputs],
|
|
150
155
|
command: `webpack-cli serve`,
|
|
151
156
|
options: {
|
|
152
157
|
cwd: projectRoot,
|
|
@@ -167,6 +172,7 @@ async function createWebpackTargets(configFilePath, projectRoot, options, contex
|
|
|
167
172
|
};
|
|
168
173
|
targets[options.serveStaticTargetName] = {
|
|
169
174
|
continuous: true,
|
|
175
|
+
inputs: [...buildInputs],
|
|
170
176
|
dependsOn: [options.buildTargetName],
|
|
171
177
|
executor: '@nx/web:file-server',
|
|
172
178
|
options: {
|
|
@@ -2,20 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ensureDependencies = ensureDependencies;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const internal_1 = require("@nx/
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
+
const internal_2 = require("@nx/js/internal");
|
|
6
7
|
const versions_1 = require("./versions");
|
|
7
8
|
function ensureDependencies(tree, options) {
|
|
8
9
|
const tasks = [];
|
|
9
10
|
const devDependencies = {};
|
|
10
11
|
if (options.compiler === 'swc') {
|
|
11
12
|
devDependencies['swc-loader'] = versions_1.swcLoaderVersion;
|
|
12
|
-
const addSwcTask = (0,
|
|
13
|
+
const addSwcTask = (0, internal_2.addSwcDependencies)(tree);
|
|
13
14
|
tasks.push(addSwcTask);
|
|
14
15
|
}
|
|
15
16
|
if (options.compiler === 'tsc') {
|
|
16
17
|
devDependencies['tslib'] = versions_1.tsLibVersion;
|
|
17
18
|
}
|
|
18
19
|
if (options.uiFramework === 'react') {
|
|
20
|
+
// @pmmmwh/react-refresh-webpack-plugin depends on core-js-pure, whose
|
|
21
|
+
// install script only prints a funding message.
|
|
22
|
+
(0, internal_1.acknowledgeBuildScripts)(tree, (0, devkit_1.detectPackageManager)(tree.root), {
|
|
23
|
+
'core-js-pure': false,
|
|
24
|
+
});
|
|
19
25
|
devDependencies['@pmmmwh/react-refresh-webpack-plugin'] =
|
|
20
26
|
versions_1.reactRefreshWebpackPluginVersion;
|
|
21
27
|
devDependencies['@svgr/webpack'] = versions_1.svgrWebpackVersion;
|
|
@@ -3,7 +3,7 @@ export declare const nxVersion: any;
|
|
|
3
3
|
export declare const swcLoaderVersion = "0.1.15";
|
|
4
4
|
export declare const tsLibVersion = "^2.3.0";
|
|
5
5
|
export declare const minSupportedWebpackVersion = "5.0.0";
|
|
6
|
-
export declare const webpackVersion = "
|
|
6
|
+
export declare const webpackVersion = "~5.110.0";
|
|
7
7
|
export declare const webpackDevServerVersion = "^5.2.1";
|
|
8
8
|
export declare const webpackCliVersion = "^7.0.0";
|
|
9
9
|
export declare const reactRefreshWebpackPluginVersion = "^0.5.7";
|
|
@@ -12,7 +12,8 @@ exports.tsLibVersion = '^2.3.0';
|
|
|
12
12
|
// `experiments.cacheUnaffected`), so webpack 5 is the supported floor.
|
|
13
13
|
exports.minSupportedWebpackVersion = '5.0.0';
|
|
14
14
|
// Fresh-install versions written when the package is not already present.
|
|
15
|
-
|
|
15
|
+
// Capped: 5.111.0 breaks MF builds (webpack/webpack#22034). Lift once @module-federation/enhanced fixes it.
|
|
16
|
+
exports.webpackVersion = '~5.110.0';
|
|
16
17
|
exports.webpackDevServerVersion = '^5.2.1';
|
|
17
18
|
exports.webpackCliVersion = '^7.0.0';
|
|
18
19
|
// React apps
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/webpack",
|
|
3
|
-
"version": "23.3.0-pr.
|
|
3
|
+
"version": "23.3.0-pr.37036.f6e3fb2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"tslib": "^2.3.0",
|
|
119
119
|
"webpack-node-externals": "^3.0.0",
|
|
120
120
|
"webpack-subresource-integrity": "^5.1.0",
|
|
121
|
-
"@nx/
|
|
122
|
-
"@nx/
|
|
121
|
+
"@nx/devkit": "23.3.0-pr.37036.f6e3fb2",
|
|
122
|
+
"@nx/js": "23.3.0-pr.37036.f6e3fb2"
|
|
123
123
|
},
|
|
124
124
|
"peerDependencies": {
|
|
125
125
|
"webpack": "^5.0.0",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
|
-
"nx": "23.3.0-pr.
|
|
141
|
+
"nx": "23.3.0-pr.37036.f6e3fb2"
|
|
142
142
|
},
|
|
143
143
|
"publishConfig": {
|
|
144
144
|
"access": "public"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<p style="text-align: center;">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
|
4
|
+
<img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
{{links}}
|
|
9
|
+
|
|
10
|
+
<hr>
|
|
11
|
+
|
|
12
|
+
# Nx: Smart Monorepos · Fast Builds
|
|
13
|
+
|
|
14
|
+
Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
|
|
15
|
+
|
|
16
|
+
This package is a [Webpack plugin for Nx](https://nx.dev/nx-api/webpack).
|
|
17
|
+
|
|
18
|
+
{{content}}
|