@nx/angular-rspack-compiler 23.0.0-beta.22 → 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.
|
@@ -26,5 +26,17 @@ export declare function setupCompilation(config: Pick<RsbuildConfig, 'mode' | 's
|
|
|
26
26
|
compilerOptions: import("@angular/compiler-cli").AngularCompilerOptions;
|
|
27
27
|
componentStylesheetBundler: ComponentStylesheetBundler;
|
|
28
28
|
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Dispose the shared component stylesheet bundler and reset the singleton.
|
|
31
|
+
*
|
|
32
|
+
* `@angular/build` >= 21.2.14 backs `ComponentStylesheetBundler` with a
|
|
33
|
+
* persistent esbuild build context (it previously used a one-shot
|
|
34
|
+
* `esbuild.build()` for non-incremental bundling). That context keeps an
|
|
35
|
+
* esbuild service - a child process and its sockets - alive until disposed,
|
|
36
|
+
* which prevents a one-shot `rspack build` from exiting once the bundle is
|
|
37
|
+
* written. Angular's own application builder disposes it in a `finally` block;
|
|
38
|
+
* we must do the same since we drive the bundler directly.
|
|
39
|
+
*/
|
|
40
|
+
export declare function disposeComponentStylesheetBundler(): Promise<void>;
|
|
29
41
|
export declare function styleTransform(componentStylesheetBundler: ComponentStylesheetBundler): (styles: string, containingFile: string, stylesheetFile?: string) => Promise<StylesheetTransformResult>;
|
|
30
42
|
//# sourceMappingURL=setup-compilation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-compilation.d.ts","sourceRoot":"","sources":["../../src/compilation/setup-compilation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAG5E,OAAO,EACL,0BAA0B,EAI3B,MAAM,wBAAwB,CAAC;AAKhC,MAA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M,CAAC;IACjB,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,gBAAgB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IACzC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,eAc5C,CAAC;AAKF,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,CAAC,EAC9C,OAAO,EAAE,uBAAuB;;;;GAyEjC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iCAAiC,IAAI,OAAO,CAAC,IAAI,CAAC,CAMvE;AAED,wBAAgB,cAAc,CAC5B,0BAA0B,EAAE,0BAA0B,IAGpD,QAAQ,MAAM,EACd,gBAAgB,MAAM,EACtB,iBAAiB,MAAM,KACtB,OAAO,CAAC,yBAAyB,CAAC,CAmCtC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_NG_COMPILER_OPTIONS = void 0;
|
|
4
4
|
exports.setupCompilation = setupCompilation;
|
|
5
|
+
exports.disposeComponentStylesheetBundler = disposeComponentStylesheetBundler;
|
|
5
6
|
exports.styleTransform = styleTransform;
|
|
6
7
|
const utils_1 = require("../utils");
|
|
7
8
|
const assert_supported_versions_1 = require("../utils/assert-supported-versions");
|
|
@@ -82,6 +83,24 @@ async function setupCompilation(config, options) {
|
|
|
82
83
|
componentStylesheetBundler: COMPONENT_STYLESHEET_BUNDLER,
|
|
83
84
|
};
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Dispose the shared component stylesheet bundler and reset the singleton.
|
|
88
|
+
*
|
|
89
|
+
* `@angular/build` >= 21.2.14 backs `ComponentStylesheetBundler` with a
|
|
90
|
+
* persistent esbuild build context (it previously used a one-shot
|
|
91
|
+
* `esbuild.build()` for non-incremental bundling). That context keeps an
|
|
92
|
+
* esbuild service - a child process and its sockets - alive until disposed,
|
|
93
|
+
* which prevents a one-shot `rspack build` from exiting once the bundle is
|
|
94
|
+
* written. Angular's own application builder disposes it in a `finally` block;
|
|
95
|
+
* we must do the same since we drive the bundler directly.
|
|
96
|
+
*/
|
|
97
|
+
async function disposeComponentStylesheetBundler() {
|
|
98
|
+
if (COMPONENT_STYLESHEET_BUNDLER) {
|
|
99
|
+
const bundler = COMPONENT_STYLESHEET_BUNDLER;
|
|
100
|
+
COMPONENT_STYLESHEET_BUNDLER = undefined;
|
|
101
|
+
await bundler.dispose();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
85
104
|
function styleTransform(componentStylesheetBundler) {
|
|
86
105
|
return async (styles, containingFile, stylesheetFile) => {
|
|
87
106
|
try {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular-rspack-compiler",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "23.0.0-beta.
|
|
4
|
+
"version": "23.0.0-beta.23",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"ts-morph": "^27.0.2",
|
|
40
40
|
"tslib": "^2.3.0",
|
|
41
41
|
"typescript": "~5.9.2",
|
|
42
|
-
"@nx/devkit": "23.0.0-beta.
|
|
42
|
+
"@nx/devkit": "23.0.0-beta.23"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"jsonc-eslint-parser": "^2.4.0",
|