@nx/angular-rspack 23.0.0-beta.21 → 23.0.0-beta.23
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-rspack-plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/angular-rspack-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"angular-rspack-plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/plugins/angular-rspack-plugin.ts"],"names":[],"mappings":"AAiBA,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,oCAAoC,EAC1C,MAAM,WAAW,CAAC;AAUnB,qBAAa,mBAAoB,YAAW,oBAAoB;;gBAU5D,OAAO,EAAE,oCAAoC,EAC7C,WAAW,CAAC,EAAE,WAAW;IAuB3B,KAAK,CAAC,QAAQ,EAAE,QAAQ;YAuWV,gBAAgB;CAkC/B"}
|
|
@@ -233,6 +233,25 @@ class AngularRspackPlugin {
|
|
|
233
233
|
process.exit(1);
|
|
234
234
|
}
|
|
235
235
|
});
|
|
236
|
+
// Dispose the shared component stylesheet bundler after a one-shot build so
|
|
237
|
+
// its esbuild service (a child process and sockets, with @angular/build >=
|
|
238
|
+
// 21.2.14) is released and `rspack build` can exit. Safe per-compiler: an
|
|
239
|
+
// SSR build runs the server compiler after the browser one
|
|
240
|
+
// (`dependencies: ['browser']`), never concurrently, and `setupCompilation`
|
|
241
|
+
// lazily recreates the singleton if a later compiler needs it again. Watch
|
|
242
|
+
// builds keep the bundler for incremental rebuilds and tear it down on
|
|
243
|
+
// process shutdown instead.
|
|
244
|
+
compiler.hooks.done.tapAsync(`${PLUGIN_NAME}_cleanup`, async (_stats, callback) => {
|
|
245
|
+
if (!watchRunInitialized) {
|
|
246
|
+
try {
|
|
247
|
+
await (0, angular_rspack_compiler_1.disposeComponentStylesheetBundler)();
|
|
248
|
+
}
|
|
249
|
+
catch {
|
|
250
|
+
// Best-effort cleanup - never fail an otherwise successful build.
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
callback();
|
|
254
|
+
});
|
|
236
255
|
compiler.hooks.normalModuleFactory.tap(PLUGIN_NAME, (normalModuleFactory) => {
|
|
237
256
|
normalModuleFactory.hooks.beforeResolve.tap(PLUGIN_NAME, (data) => {
|
|
238
257
|
if (data.request.startsWith('angular:jit:')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"misc-helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/misc-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"misc-helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/misc-helpers.ts"],"names":[],"mappings":"AAMA,wBAAgB,aAAa,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAiBrE;AAYD,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,KAAK,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAS5C;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAQtE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAQ/C"}
|
|
@@ -6,11 +6,29 @@ exports.isPackageInstalled = isPackageInstalled;
|
|
|
6
6
|
exports.assertNever = assertNever;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
const node_assert_1 = tslib_1.__importDefault(require("node:assert"));
|
|
9
|
+
const node_path_1 = require("node:path");
|
|
10
|
+
const node_url_1 = require("node:url");
|
|
9
11
|
let load;
|
|
10
12
|
function loadEsmModule(modulePath) {
|
|
11
13
|
load ??= new Function('modulePath', `return import(modulePath);`);
|
|
14
|
+
// The dynamic import lives inside `new Function(...)` to stop TypeScript from
|
|
15
|
+
// downleveling it to require(). A side effect is that bare specifiers are
|
|
16
|
+
// resolved against the location of the Function rather than this module, so
|
|
17
|
+
// under Node >= 26's stricter ESM resolver they fail with ERR_MODULE_NOT_FOUND
|
|
18
|
+
// even for declared dependencies. Resolve bare specifiers here, where this
|
|
19
|
+
// package's dependencies are reachable, and hand off an absolute file URL.
|
|
20
|
+
if (typeof modulePath === 'string' && isBareSpecifier(modulePath)) {
|
|
21
|
+
modulePath = (0, node_url_1.pathToFileURL)(require.resolve(modulePath)).href;
|
|
22
|
+
}
|
|
12
23
|
return load(modulePath);
|
|
13
24
|
}
|
|
25
|
+
function isBareSpecifier(specifier) {
|
|
26
|
+
return (!specifier.startsWith('.') &&
|
|
27
|
+
!(0, node_path_1.isAbsolute)(specifier) &&
|
|
28
|
+
!specifier.includes('://') &&
|
|
29
|
+
!specifier.startsWith('node:') &&
|
|
30
|
+
!specifier.startsWith('data:'));
|
|
31
|
+
}
|
|
14
32
|
function assertIsError(value) {
|
|
15
33
|
const isError = value instanceof Error ||
|
|
16
34
|
// The following is needed to identify errors coming from RxJs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular-rspack",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.23",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"@ampproject/remapping": "2.3.0",
|
|
49
49
|
"@babel/core": "^7.23.2",
|
|
50
50
|
"@discoveryjs/json-ext": "0.6.3",
|
|
51
|
-
"@nx/angular-rspack-compiler": "23.0.0-beta.
|
|
52
|
-
"@nx/devkit": "23.0.0-beta.
|
|
51
|
+
"@nx/angular-rspack-compiler": "23.0.0-beta.23",
|
|
52
|
+
"@nx/devkit": "23.0.0-beta.23",
|
|
53
53
|
"ansi-colors": "4.1.3",
|
|
54
54
|
"autoprefixer": "^10.4.9",
|
|
55
55
|
"deepmerge": "^4.3.1",
|