@nx/rspack 0.0.0-pr-30418-4e2b721 → 0.0.0-pr-3-ec41644
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 +0 -1
- package/migrations.json +1 -5
- package/package.json +10 -11
- package/src/executors/rspack/lib/normalize-options.js +0 -1
- package/src/executors/rspack/schema.d.ts +1 -6
- package/src/executors/rspack/schema.json +0 -14
- package/src/generators/application/lib/normalize-options.js +7 -7
- package/src/generators/init/init.js +0 -4
- package/src/plugins/plugin.js +5 -26
- package/src/plugins/utils/apply-base-config.js +3 -3
- package/src/plugins/utils/apply-web-config.js +3 -20
- package/src/plugins/utils/models.d.ts +1 -9
- package/src/plugins/utils/plugins/normalize-options.js +0 -1
- package/src/plugins/utils/plugins/rspack-nx-build-coordination-plugin.js +2 -1
- package/src/utils/versions.d.ts +1 -2
- package/src/utils/versions.js +2 -3
- package/src/utils/with-web.d.ts +0 -3
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.md +0 -30
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.md +0 -28
package/generators.json
CHANGED
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"description": "React application generator."
|
|
29
29
|
},
|
|
30
30
|
"convert-webpack": {
|
|
31
|
-
"alias": "convert-to-rspack",
|
|
32
31
|
"factory": "./src/generators/convert-webpack/convert-webpack",
|
|
33
32
|
"schema": "./src/generators/convert-webpack/schema.json",
|
|
34
33
|
"description": "Convert a webpack application to use rspack."
|
package/migrations.json
CHANGED
|
@@ -96,12 +96,8 @@
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"20.5.0": {
|
|
99
|
-
"version": "20.5.0-beta.
|
|
99
|
+
"version": "20.5.0-beta.3",
|
|
100
100
|
"packages": {
|
|
101
|
-
"sass-loader": {
|
|
102
|
-
"version": "^16.0.4",
|
|
103
|
-
"alwaysAddToPackageJson": false
|
|
104
|
-
},
|
|
105
101
|
"@rspack/core": {
|
|
106
102
|
"version": "^1.2.2",
|
|
107
103
|
"alwaysAddToPackageJson": false
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/rspack",
|
|
3
3
|
"description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
|
|
4
|
-
"version": "0.0.0-pr-
|
|
4
|
+
"version": "0.0.0-pr-3-ec41644",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"generators": "./generators.json",
|
|
25
25
|
"executors": "./executors.json",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@nx/js": "0.0.0-pr-
|
|
28
|
-
"@nx/devkit": "0.0.0-pr-
|
|
29
|
-
"@nx/web": "0.0.0-pr-
|
|
30
|
-
"@nx/module-federation": "0.0.0-pr-
|
|
27
|
+
"@nx/js": "0.0.0-pr-3-ec41644",
|
|
28
|
+
"@nx/devkit": "0.0.0-pr-3-ec41644",
|
|
29
|
+
"@nx/web": "0.0.0-pr-3-ec41644",
|
|
30
|
+
"@nx/module-federation": "0.0.0-pr-3-ec41644",
|
|
31
31
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
32
32
|
"@rspack/core": "^1.1.5",
|
|
33
33
|
"@rspack/dev-server": "^1.0.9",
|
|
@@ -37,14 +37,13 @@
|
|
|
37
37
|
"css-loader": "^6.4.0",
|
|
38
38
|
"enquirer": "~2.3.6",
|
|
39
39
|
"express": "^4.21.2",
|
|
40
|
-
"ts-checker-
|
|
40
|
+
"fork-ts-checker-webpack-plugin": "7.2.13",
|
|
41
41
|
"http-proxy-middleware": "^3.0.3",
|
|
42
42
|
"less-loader": "11.1.0",
|
|
43
43
|
"license-webpack-plugin": "^4.0.2",
|
|
44
44
|
"loader-utils": "^2.0.3",
|
|
45
|
-
"sass": "^1.
|
|
46
|
-
"sass-
|
|
47
|
-
"sass-loader": "^16.0.4",
|
|
45
|
+
"sass": "^1.42.1",
|
|
46
|
+
"sass-loader": "^12.2.0",
|
|
48
47
|
"source-map-loader": "^5.0.0",
|
|
49
48
|
"style-loader": "^3.3.0",
|
|
50
49
|
"picocolors": "^1.1.0",
|
|
@@ -56,8 +55,8 @@
|
|
|
56
55
|
"webpack-node-externals": "^3.0.0"
|
|
57
56
|
},
|
|
58
57
|
"peerDependencies": {
|
|
59
|
-
"@module-federation/enhanced": "^0.
|
|
60
|
-
"@module-federation/node": "^2.6.
|
|
58
|
+
"@module-federation/enhanced": "^0.8.8",
|
|
59
|
+
"@module-federation/node": "^2.6.21"
|
|
61
60
|
},
|
|
62
61
|
"nx-migrations": {
|
|
63
62
|
"migrations": "./migrations.json"
|
|
@@ -22,7 +22,6 @@ function normalizeOptions(options, root, projectRoot, sourceRoot) {
|
|
|
22
22
|
styles: options.optimization,
|
|
23
23
|
}
|
|
24
24
|
: options.optimization,
|
|
25
|
-
sassImplementation: options.sassImplementation ?? 'sass',
|
|
26
25
|
};
|
|
27
26
|
if (options.assets) {
|
|
28
27
|
normalizedOptions.assets = (0, normalize_options_1.normalizeAssets)(options.assets, root, sourceRoot, projectRoot, false // executor assets are relative to workspace root for consistency
|
|
@@ -35,12 +35,7 @@ export interface RspackExecutorSchema {
|
|
|
35
35
|
sourceMap?: boolean | DevTool;
|
|
36
36
|
standardRspackConfigFunction?: boolean;
|
|
37
37
|
statsJson?: boolean;
|
|
38
|
-
stylePreprocessorOptions?:
|
|
39
|
-
includePaths?: string[];
|
|
40
|
-
sassOptions?: Record<string, any>;
|
|
41
|
-
lessOptions?: Record<string, any>;
|
|
42
|
-
};
|
|
43
|
-
sassImplementation?: 'sass' | 'sass-embedded';
|
|
38
|
+
stylePreprocessorOptions?: any;
|
|
44
39
|
styles?: Array<ExtraEntryPointClass | string>;
|
|
45
40
|
target?: 'web' | 'node';
|
|
46
41
|
transformers?: TransformerEntry[];
|
|
@@ -245,24 +245,10 @@
|
|
|
245
245
|
"items": {
|
|
246
246
|
"type": "string"
|
|
247
247
|
}
|
|
248
|
-
},
|
|
249
|
-
"sassOptions": {
|
|
250
|
-
"description": "Options to pass to sass-loader.",
|
|
251
|
-
"type": "object"
|
|
252
|
-
},
|
|
253
|
-
"lessOptions": {
|
|
254
|
-
"description": "Options to pass to less-loader.",
|
|
255
|
-
"type": "object"
|
|
256
248
|
}
|
|
257
249
|
},
|
|
258
250
|
"additionalProperties": false
|
|
259
251
|
},
|
|
260
|
-
"sassImplementation": {
|
|
261
|
-
"type": "string",
|
|
262
|
-
"description": "The implementation of the SASS compiler to use. Can be either `sass` or `sass-embedded`. Defaults to `sass-embedded`.",
|
|
263
|
-
"enum": ["sass", "sass-embedded"],
|
|
264
|
-
"default": "sass"
|
|
265
|
-
},
|
|
266
252
|
"styles": {
|
|
267
253
|
"type": "array",
|
|
268
254
|
"description": "External Styles which will be included with the application",
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
5
|
-
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
6
6
|
async function normalizeOptions(host, options) {
|
|
7
|
-
await (0, project_name_and_root_utils_1.
|
|
8
|
-
const { projectName, projectRoot: appProjectRoot
|
|
7
|
+
await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'application');
|
|
8
|
+
const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
9
9
|
...options,
|
|
10
10
|
projectType: 'application',
|
|
11
11
|
});
|
|
12
12
|
// --monorepo takes precedence over --rootProject
|
|
13
13
|
// This won't be needed once we add --bundler=rspack to the @nx/react:app preset
|
|
14
14
|
const rootProject = !options.monorepo && options.rootProject;
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const e2eProjectName = options.rootProject
|
|
16
|
+
? 'e2e'
|
|
17
|
+
: `${(0, devkit_1.names)(appProjectName).fileName}-e2e`;
|
|
18
18
|
const normalized = {
|
|
19
19
|
...options,
|
|
20
20
|
rootProject,
|
|
21
|
-
name:
|
|
21
|
+
name: (0, devkit_1.names)(options.name).fileName,
|
|
22
22
|
projectName: appProjectName,
|
|
23
23
|
appProjectRoot,
|
|
24
24
|
e2eProjectName,
|
|
@@ -70,10 +70,6 @@ async function rspackInitGenerator(tree, schema) {
|
|
|
70
70
|
if (schema.style === 'less') {
|
|
71
71
|
devDependencies['less-loader'] = versions_1.lessLoaderVersion;
|
|
72
72
|
}
|
|
73
|
-
if (schema.style === 'scss') {
|
|
74
|
-
devDependencies['sass-loader'] = versions_1.sassLoaderVersion;
|
|
75
|
-
devDependencies['sass-embedded'] = versions_1.sassEmbeddedVersion;
|
|
76
|
-
}
|
|
77
73
|
if (schema.framework !== 'none' || schema.devServer) {
|
|
78
74
|
devDependencies['@rspack/dev-server'] = versions_1.rspackDevServerVersion;
|
|
79
75
|
}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -14,14 +14,7 @@ const resolve_user_defined_rspack_config_1 = require("../utils/resolve-user-defi
|
|
|
14
14
|
const util_1 = require("@nx/js/src/plugins/typescript/util");
|
|
15
15
|
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
16
16
|
function readTargetsCache(cachePath) {
|
|
17
|
-
|
|
18
|
-
return process.env.NX_CACHE_PROJECT_GRAPH !== 'false'
|
|
19
|
-
? (0, devkit_1.readJsonFile)(cachePath)
|
|
20
|
-
: {};
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
17
|
+
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
25
18
|
}
|
|
26
19
|
function writeTargetsToCache(cachePath, results) {
|
|
27
20
|
(0, devkit_1.writeJsonFile)(cachePath, results);
|
|
@@ -92,24 +85,9 @@ async function createRspackTargets(configFilePath, projectRoot, options, context
|
|
|
92
85
|
}
|
|
93
86
|
}
|
|
94
87
|
const targets = {};
|
|
95
|
-
const env = {};
|
|
96
|
-
const isTsConfig = ['.ts', '.cts', '.mts'].includes((0, path_1.extname)(configFilePath));
|
|
97
|
-
if (isTsConfig) {
|
|
98
|
-
// https://rspack.dev/config/#using-ts-node
|
|
99
|
-
const existingValue = process.env['TS_NODE_COMPILER_OPTIONS'];
|
|
100
|
-
env['TS_NODE_COMPILER_OPTIONS'] = JSON.stringify({
|
|
101
|
-
...(existingValue ? JSON.parse(existingValue) : {}),
|
|
102
|
-
module: 'CommonJS',
|
|
103
|
-
moduleResolution: 'Node10',
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
88
|
targets[options.buildTargetName] = {
|
|
107
89
|
command: `rspack build`,
|
|
108
|
-
options: {
|
|
109
|
-
cwd: projectRoot,
|
|
110
|
-
args: ['--node-env=production'],
|
|
111
|
-
env,
|
|
112
|
-
},
|
|
90
|
+
options: { cwd: projectRoot, args: ['--node-env=production'] },
|
|
113
91
|
cache: true,
|
|
114
92
|
dependsOn: [`^${options.buildTargetName}`],
|
|
115
93
|
inputs: 'production' in namedInputs
|
|
@@ -130,22 +108,23 @@ async function createRspackTargets(configFilePath, projectRoot, options, context
|
|
|
130
108
|
outputs,
|
|
131
109
|
};
|
|
132
110
|
targets[options.serveTargetName] = {
|
|
111
|
+
continuous: true,
|
|
133
112
|
command: `rspack serve`,
|
|
134
113
|
options: {
|
|
135
114
|
cwd: projectRoot,
|
|
136
115
|
args: ['--node-env=development'],
|
|
137
|
-
env,
|
|
138
116
|
},
|
|
139
117
|
};
|
|
140
118
|
targets[options.previewTargetName] = {
|
|
119
|
+
continuous: true,
|
|
141
120
|
command: `rspack serve`,
|
|
142
121
|
options: {
|
|
143
122
|
cwd: projectRoot,
|
|
144
123
|
args: ['--node-env=production'],
|
|
145
|
-
env,
|
|
146
124
|
},
|
|
147
125
|
};
|
|
148
126
|
targets[options.serveStaticTargetName] = {
|
|
127
|
+
continuous: true,
|
|
149
128
|
executor: '@nx/web:file-server',
|
|
150
129
|
options: {
|
|
151
130
|
buildTarget: options.buildTargetName,
|
|
@@ -179,13 +179,13 @@ function applyNxDependentConfig(options, config, { useNormalizedEntry } = {}) {
|
|
|
179
179
|
}
|
|
180
180
|
// New TS Solution already has a typecheck target
|
|
181
181
|
if (!options?.skipTypeChecking && !isUsingTsSolution) {
|
|
182
|
-
const
|
|
183
|
-
plugins.push(new
|
|
182
|
+
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|
183
|
+
plugins.push(new ForkTsCheckerWebpackPlugin({
|
|
184
184
|
typescript: {
|
|
185
185
|
configFile: path.isAbsolute(tsConfig)
|
|
186
186
|
? tsConfig
|
|
187
187
|
: path.join(options.root, tsConfig),
|
|
188
|
-
memoryLimit: options.memoryLimit ||
|
|
188
|
+
memoryLimit: options.memoryLimit || 2018,
|
|
189
189
|
},
|
|
190
190
|
}));
|
|
191
191
|
}
|
|
@@ -54,8 +54,6 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
54
54
|
const globalStylePaths = [];
|
|
55
55
|
// Determine hashing format.
|
|
56
56
|
const hashFormat = (0, hash_format_1.getOutputHashFormat)(options.outputHashing);
|
|
57
|
-
const sassOptions = options.stylePreprocessorOptions?.sassOptions;
|
|
58
|
-
const lessOptions = options.stylePreprocessorOptions?.lessOptions;
|
|
59
57
|
const includePaths = [];
|
|
60
58
|
if (options?.stylePreprocessorOptions?.includePaths?.length > 0) {
|
|
61
59
|
options.stylePreprocessorOptions.includePaths.forEach((includePath) => includePaths.push((0, path_1.resolve)(options.root, includePath)));
|
|
@@ -90,15 +88,11 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
90
88
|
{
|
|
91
89
|
loader: require.resolve('sass-loader'),
|
|
92
90
|
options: {
|
|
93
|
-
implementation:
|
|
94
|
-
? require.resolve('sass-embedded')
|
|
95
|
-
: require.resolve('sass'),
|
|
96
|
-
api: 'modern-compiler',
|
|
91
|
+
implementation: require('sass'),
|
|
97
92
|
sassOptions: {
|
|
98
93
|
fiber: false,
|
|
99
94
|
precision: 8,
|
|
100
95
|
includePaths,
|
|
101
|
-
...(sassOptions ?? {}),
|
|
102
96
|
},
|
|
103
97
|
},
|
|
104
98
|
},
|
|
@@ -114,7 +108,6 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
114
108
|
options: {
|
|
115
109
|
lessOptions: {
|
|
116
110
|
paths: includePaths,
|
|
117
|
-
...(lessOptions ?? {}),
|
|
118
111
|
},
|
|
119
112
|
},
|
|
120
113
|
},
|
|
@@ -150,17 +143,13 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
150
143
|
{
|
|
151
144
|
loader: require.resolve('sass-loader'),
|
|
152
145
|
options: {
|
|
153
|
-
|
|
154
|
-
implementation: options.sassImplementation === 'sass-embedded'
|
|
155
|
-
? require.resolve('sass-embedded')
|
|
156
|
-
: require.resolve('sass'),
|
|
146
|
+
implementation: require('sass'),
|
|
157
147
|
sourceMap: !!options.sourceMap,
|
|
158
148
|
sassOptions: {
|
|
159
149
|
fiber: false,
|
|
160
150
|
// bootstrap-sass requires a minimum precision of 8
|
|
161
151
|
precision: 8,
|
|
162
152
|
includePaths,
|
|
163
|
-
...(sassOptions ?? {}),
|
|
164
153
|
},
|
|
165
154
|
},
|
|
166
155
|
},
|
|
@@ -178,7 +167,6 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
178
167
|
lessOptions: {
|
|
179
168
|
javascriptEnabled: true,
|
|
180
169
|
...lessPathOptions,
|
|
181
|
-
...(lessOptions ?? {}),
|
|
182
170
|
},
|
|
183
171
|
},
|
|
184
172
|
},
|
|
@@ -215,17 +203,13 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
215
203
|
{
|
|
216
204
|
loader: require.resolve('sass-loader'),
|
|
217
205
|
options: {
|
|
218
|
-
|
|
219
|
-
implementation: options.sassImplementation === 'sass-embedded'
|
|
220
|
-
? require.resolve('sass-embedded')
|
|
221
|
-
: require.resolve('sass'),
|
|
206
|
+
implementation: require('sass'),
|
|
222
207
|
sourceMap: !!options.sourceMap,
|
|
223
208
|
sassOptions: {
|
|
224
209
|
fiber: false,
|
|
225
210
|
// bootstrap-sass requires a minimum precision of 8
|
|
226
211
|
precision: 8,
|
|
227
212
|
includePaths,
|
|
228
|
-
...(sassOptions ?? {}),
|
|
229
213
|
},
|
|
230
214
|
},
|
|
231
215
|
},
|
|
@@ -243,7 +227,6 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
|
|
|
243
227
|
lessOptions: {
|
|
244
228
|
javascriptEnabled: true,
|
|
245
229
|
...lessPathOptions,
|
|
246
|
-
...(lessOptions ?? {}),
|
|
247
230
|
},
|
|
248
231
|
},
|
|
249
232
|
},
|
|
@@ -148,10 +148,6 @@ export interface NxAppRspackPluginOptions {
|
|
|
148
148
|
* Add an additional chunk for the rspack runtime. Defaults to `true` when `target === 'web'`.
|
|
149
149
|
*/
|
|
150
150
|
runtimeChunk?: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* The implementation of the SASS compiler to use. Can be either `sass` or `sass-embedded`. Defaults to `sass-embedded`.
|
|
153
|
-
*/
|
|
154
|
-
sassImplementation?: 'sass' | 'sass-embedded';
|
|
155
151
|
/**
|
|
156
152
|
* External scripts that will be included before the main application entry.
|
|
157
153
|
*/
|
|
@@ -187,11 +183,7 @@ export interface NxAppRspackPluginOptions {
|
|
|
187
183
|
/**
|
|
188
184
|
* Options for the style preprocessor. e.g. `{ "includePaths": [] }` for SASS.
|
|
189
185
|
*/
|
|
190
|
-
stylePreprocessorOptions?:
|
|
191
|
-
includePaths?: string[];
|
|
192
|
-
sassOptions?: Record<string, any>;
|
|
193
|
-
lessOptions?: Record<string, any>;
|
|
194
|
-
};
|
|
186
|
+
stylePreprocessorOptions?: any;
|
|
195
187
|
/**
|
|
196
188
|
* External stylesheets that will be included with the application.
|
|
197
189
|
*/
|
|
@@ -77,7 +77,6 @@ function normalizeOptions(options) {
|
|
|
77
77
|
projectRoot: projectNode.data.root,
|
|
78
78
|
root: devkit_1.workspaceRoot,
|
|
79
79
|
runtimeChunk: combinedPluginAndMaybeExecutorOptions.runtimeChunk ?? true,
|
|
80
|
-
sassImplementation: combinedPluginAndMaybeExecutorOptions.sassImplementation ?? 'sass',
|
|
81
80
|
scripts: combinedPluginAndMaybeExecutorOptions.scripts ?? [],
|
|
82
81
|
sourceMap: combinedPluginAndMaybeExecutorOptions.sourceMap ?? !isProd,
|
|
83
82
|
sourceRoot,
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RspackNxBuildCoordinationPlugin = void 0;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
5
|
const client_1 = require("nx/src/daemon/client/client");
|
|
6
|
+
const enabled_1 = require("nx/src/daemon/client/enabled");
|
|
6
7
|
const watch_1 = require("nx/src/command-line/watch/watch");
|
|
7
8
|
const output_1 = require("nx/src/utils/output");
|
|
8
9
|
class RspackNxBuildCoordinationPlugin {
|
|
@@ -13,7 +14,7 @@ class RspackNxBuildCoordinationPlugin {
|
|
|
13
14
|
if (!skipInitialBuild) {
|
|
14
15
|
this.buildChangedProjects();
|
|
15
16
|
}
|
|
16
|
-
if ((0,
|
|
17
|
+
if ((0, enabled_1.isDaemonEnabled)()) {
|
|
17
18
|
this.startWatchingBuildableLibs();
|
|
18
19
|
}
|
|
19
20
|
else {
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -4,14 +4,13 @@ export declare const rspackDevServerVersion = "1.0.9";
|
|
|
4
4
|
export declare const rspackPluginMinifyVersion = "^0.7.5";
|
|
5
5
|
export declare const rspackPluginReactRefreshVersion = "^1.0.0";
|
|
6
6
|
export declare const lessLoaderVersion = "~11.1.3";
|
|
7
|
-
export declare const sassLoaderVersion = "^16.0.4";
|
|
8
|
-
export declare const sassEmbeddedVersion = "^1.83.4";
|
|
9
7
|
export declare const reactRefreshVersion = "~0.14.0";
|
|
10
8
|
export declare const nestjsCommonVersion = "~9.0.0";
|
|
11
9
|
export declare const nestjsCoreVersion = "~9.0.0";
|
|
12
10
|
export declare const nestjsPlatformExpressVersion = "~9.0.0";
|
|
13
11
|
export declare const nestjsMicroservicesVersion = "~9.0.0";
|
|
14
12
|
export declare const lessVersion = "4.1.3";
|
|
13
|
+
export declare const sassVersion = "^1.42.1";
|
|
15
14
|
export declare const stylusVersion = "^0.55.0";
|
|
16
15
|
export declare const eslintPluginImportVersion = "2.27.5";
|
|
17
16
|
export declare const eslintPluginJsxA11yVersion = "6.7.1";
|
package/src/utils/versions.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.eslintPluginReactHooksVersion = exports.eslintPluginReactVersion = exports.eslintPluginJsxA11yVersion = exports.eslintPluginImportVersion = exports.stylusVersion = exports.lessVersion = exports.nestjsMicroservicesVersion = exports.nestjsPlatformExpressVersion = exports.nestjsCoreVersion = exports.nestjsCommonVersion = exports.reactRefreshVersion = exports.
|
|
3
|
+
exports.eslintPluginReactHooksVersion = exports.eslintPluginReactVersion = exports.eslintPluginJsxA11yVersion = exports.eslintPluginImportVersion = exports.stylusVersion = exports.sassVersion = exports.lessVersion = exports.nestjsMicroservicesVersion = exports.nestjsPlatformExpressVersion = exports.nestjsCoreVersion = exports.nestjsCommonVersion = exports.reactRefreshVersion = exports.lessLoaderVersion = exports.rspackPluginReactRefreshVersion = exports.rspackPluginMinifyVersion = exports.rspackDevServerVersion = exports.rspackCoreVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
5
|
exports.rspackCoreVersion = '1.2.2';
|
|
6
6
|
exports.rspackDevServerVersion = '1.0.9';
|
|
7
7
|
exports.rspackPluginMinifyVersion = '^0.7.5';
|
|
8
8
|
exports.rspackPluginReactRefreshVersion = '^1.0.0';
|
|
9
9
|
exports.lessLoaderVersion = '~11.1.3';
|
|
10
|
-
exports.sassLoaderVersion = '^16.0.4';
|
|
11
|
-
exports.sassEmbeddedVersion = '^1.83.4';
|
|
12
10
|
exports.reactRefreshVersion = '~0.14.0';
|
|
13
11
|
exports.nestjsCommonVersion = '~9.0.0';
|
|
14
12
|
exports.nestjsCoreVersion = '~9.0.0';
|
|
15
13
|
exports.nestjsPlatformExpressVersion = '~9.0.0';
|
|
16
14
|
exports.nestjsMicroservicesVersion = '~9.0.0';
|
|
17
15
|
exports.lessVersion = '4.1.3';
|
|
16
|
+
exports.sassVersion = '^1.42.1';
|
|
18
17
|
exports.stylusVersion = '^0.55.0';
|
|
19
18
|
exports.eslintPluginImportVersion = '2.27.5';
|
|
20
19
|
exports.eslintPluginJsxA11yVersion = '6.7.1';
|
package/src/utils/with-web.d.ts
CHANGED
|
@@ -8,13 +8,10 @@ export interface WithWebOptions {
|
|
|
8
8
|
generateIndexHtml?: boolean;
|
|
9
9
|
index?: string;
|
|
10
10
|
postcssConfig?: string;
|
|
11
|
-
sassImplementation?: 'sass' | 'sass-embedded';
|
|
12
11
|
scripts?: Array<ExtraEntryPointClass | string>;
|
|
13
12
|
styles?: Array<ExtraEntryPointClass | string>;
|
|
14
13
|
stylePreprocessorOptions?: {
|
|
15
14
|
includePaths?: string[];
|
|
16
|
-
sassOptions?: Record<string, any>;
|
|
17
|
-
lessOptions?: Record<string, any>;
|
|
18
15
|
};
|
|
19
16
|
cssModules?: boolean;
|
|
20
17
|
ssr?: boolean;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#### Migrate withModuleFederation Import to New Package
|
|
2
|
-
|
|
3
|
-
Update the withModuleFederation import to use @nx/module-federation/rspack.
|
|
4
|
-
|
|
5
|
-
#### Sample Code Changes
|
|
6
|
-
|
|
7
|
-
Update import paths for `withModuleFederation` and `withModuleFederationForSSR`.
|
|
8
|
-
|
|
9
|
-
{% tabs %}
|
|
10
|
-
{% tab label="Before" %}
|
|
11
|
-
|
|
12
|
-
```ts {% fileName="apps/shell/rspack.config.ts" %}
|
|
13
|
-
import {
|
|
14
|
-
withModuleFederation,
|
|
15
|
-
withModuleFederationForSSR,
|
|
16
|
-
} from '@nx/rspack/module-federation';
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
{% /tab %}
|
|
20
|
-
{% tab label="After" %}
|
|
21
|
-
|
|
22
|
-
```ts {% fileName="apps/shell/rspack.config.ts" %}
|
|
23
|
-
import {
|
|
24
|
-
withModuleFederation,
|
|
25
|
-
withModuleFederationForSSR,
|
|
26
|
-
} from '@nx/module-federation/rspack';
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
{% /tab %}
|
|
30
|
-
{% /tabs %}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#### Ensure the @nx/module-federation Package is Installed
|
|
2
|
-
|
|
3
|
-
If workspace includes Module Federation projects, ensure the new `@nx/module-federation` package is installed.
|
|
4
|
-
|
|
5
|
-
#### Sample Code Changes
|
|
6
|
-
|
|
7
|
-
{% tabs %}
|
|
8
|
-
{% tab label="Before" %}
|
|
9
|
-
|
|
10
|
-
```json {% fileName="package.json" %}
|
|
11
|
-
{
|
|
12
|
-
"dependencies": {}
|
|
13
|
-
}
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
{% /tab %}
|
|
17
|
-
{% tab label="After" %}
|
|
18
|
-
|
|
19
|
-
```json {% fileName="package.json" %}
|
|
20
|
-
{
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@nx/module-federation": "20.3.0"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
{% /tab %}
|
|
28
|
-
{% /tabs %}
|