@nx/angular-rspack 21.0.4 → 21.1.0
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/dist/lib/config/config-utils/dev-server-config-utils.js +2 -1
- package/dist/lib/plugins/tools/worker-pool.d.ts.map +1 -1
- package/dist/lib/plugins/tools/worker-pool.js +0 -3
- package/dist/lib/utils/stats.d.ts.map +1 -1
- package/package.json +6 -12
- package/dist/lib/ssr/server.d.ts +0 -13
- package/dist/lib/ssr/server.d.ts.map +0 -1
- package/dist/lib/ssr/server.js +0 -47
|
@@ -180,7 +180,8 @@ async function getProxyConfig(root, proxyConfig) {
|
|
|
180
180
|
}
|
|
181
181
|
catch (e) {
|
|
182
182
|
assertIsError(e);
|
|
183
|
-
if (e.code !== 'ERR_REQUIRE_ESM'
|
|
183
|
+
if (e.code !== 'ERR_REQUIRE_ESM' &&
|
|
184
|
+
e.code !== 'ERR_REQUIRE_ASYNC_MODULE') {
|
|
184
185
|
throw e;
|
|
185
186
|
}
|
|
186
187
|
// Load the ESM configuration file using the TypeScript dynamic import workaround.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-pool.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/tools/worker-pool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzE,qBAAa,UAAW,SAAQ,OAAO;gBACzB,OAAO,EAAE,iBAAiB;
|
|
1
|
+
{"version":3,"file":"worker-pool.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/tools/worker-pool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzE,qBAAa,UAAW,SAAQ,OAAO;gBACzB,OAAO,EAAE,iBAAiB;CAUvC"}
|
|
@@ -14,9 +14,6 @@ class WorkerPool extends piscina_1.Piscina {
|
|
|
14
14
|
const piscinaOptions = {
|
|
15
15
|
minThreads: 1,
|
|
16
16
|
idleTimeout: 1000,
|
|
17
|
-
// Web containers do not support transferable objects with receiveOnMessagePort which
|
|
18
|
-
// is used when the Atomics based wait loop is enable.
|
|
19
|
-
useAtomics: !process.versions.webcontainer,
|
|
20
17
|
recordTiming: false,
|
|
21
18
|
...options,
|
|
22
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/stats.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,sBAAsB,EAGvB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,YAAY,EACb,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,oCAAoC,EACpC,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,yCAAyC,CAAC;AAMjD,MAAM,WAAW,qBAAqB;IACpC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACtC,aAAa,CAAC,OAAO,CAAC,EACtB,MAAM,GAAG,OAAO,GAAG,SAAS,CAC7B,CAAC;AAEF,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,kBAAkB,EAAE,EACtC,iBAAiB,EAAE,MAAM,GACxB,oBAAoB,EAAE,CAmBxB;AA+HD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,kBAAkB,GAC9B,MAAM,CAsDR;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,gBAAgB,E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zC,OAAO,EAAE,oCAAoC,IAQrC,UAAK,EAAE,WAAM,UActB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,OAAO,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,oCAAoC,GAC5C,eAAe,CAoDjB;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,YAAY,EACzB,cAAc,CAAC,EAAE,sBAAsB,EAAE,GACxC,IAAI,CAgBN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular-rspack",
|
|
3
|
-
"version": "21.0
|
|
3
|
+
"version": "21.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -41,10 +41,6 @@
|
|
|
41
41
|
"./loaders/platform-server-exports-loader": {
|
|
42
42
|
"types": "./dist/lib/plugins/loaders/platform-server-exports.loader.d.ts",
|
|
43
43
|
"default": "./dist/lib/plugins/loaders/platform-server-exports.loader.js"
|
|
44
|
-
},
|
|
45
|
-
"./ssr": {
|
|
46
|
-
"types": "./dist/lib/ssr/server.d.ts",
|
|
47
|
-
"default": "./dist/lib/ssr/server.js"
|
|
48
44
|
}
|
|
49
45
|
},
|
|
50
46
|
"dependencies": {
|
|
@@ -55,7 +51,6 @@
|
|
|
55
51
|
"ansi-colors": "4.1.3",
|
|
56
52
|
"autoprefixer": "10.4.21",
|
|
57
53
|
"deepmerge": "^4.3.1",
|
|
58
|
-
"express": "4.21.1",
|
|
59
54
|
"css-loader": "^7.1.2",
|
|
60
55
|
"jsonc-parser": "^3.3.1",
|
|
61
56
|
"less-loader": "^12.2.0",
|
|
@@ -64,7 +59,7 @@
|
|
|
64
59
|
"open": "10.1.0",
|
|
65
60
|
"ora": "5.4.1",
|
|
66
61
|
"parse5-html-rewriting-stream": "7.0.0",
|
|
67
|
-
"piscina": "
|
|
62
|
+
"piscina": "5.0.0",
|
|
68
63
|
"postcss": "8.5.3",
|
|
69
64
|
"postcss-loader": "8.1.1",
|
|
70
65
|
"resolve-url-loader": "^5.0.0",
|
|
@@ -74,7 +69,7 @@
|
|
|
74
69
|
"tslib": "^2.3.0",
|
|
75
70
|
"webpack-merge": "^6.0.1",
|
|
76
71
|
"ws": "^8.18.0",
|
|
77
|
-
"@nx/angular-rspack-compiler": "21.0
|
|
72
|
+
"@nx/angular-rspack-compiler": "21.1.0"
|
|
78
73
|
},
|
|
79
74
|
"devDependencies": {
|
|
80
75
|
"@code-pushup/models": "^0.63.0",
|
|
@@ -83,10 +78,9 @@
|
|
|
83
78
|
"@ng-rspack/testing-setup": "0.0.1"
|
|
84
79
|
},
|
|
85
80
|
"peerDependencies": {
|
|
86
|
-
"@angular/
|
|
87
|
-
"@angular/
|
|
88
|
-
"@angular/
|
|
89
|
-
"@angular/platform-server": ">=19.0.0 <20.0.0",
|
|
81
|
+
"@angular/build": ">=19.0.0 <21.0.0",
|
|
82
|
+
"@angular/localize": ">=19.0.0 <21.0.0",
|
|
83
|
+
"@angular/platform-server": ">=19.0.0 <21.0.0",
|
|
90
84
|
"zone.js": ">=0.14.0 <0.16.0",
|
|
91
85
|
"@angular/ssr": ">=19.0.0 <20.0.0",
|
|
92
86
|
"@rspack/core": ">=1.3.5 <2.0.0",
|
package/dist/lib/ssr/server.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
interface RspackAngularServer {
|
|
3
|
-
app: express.Express;
|
|
4
|
-
listen: (port?: number) => void;
|
|
5
|
-
}
|
|
6
|
-
export interface RspackAngularServerOptions {
|
|
7
|
-
serverDistFolder?: string;
|
|
8
|
-
browserDistFolder?: string;
|
|
9
|
-
indexHtml?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function createServer(bootstrap: any, opts?: RspackAngularServerOptions): RspackAngularServer;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/lib/ssr/server.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,UAAU,mBAAmB;IAC3B,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC;IACrB,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAC1B,SAAS,EAAE,GAAG,EACd,IAAI,CAAC,EAAE,0BAA0B,GAChC,mBAAmB,CAmDrB"}
|
package/dist/lib/ssr/server.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createServer = createServer;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const common_1 = require("@angular/common");
|
|
6
|
-
const node_1 = require("@angular/ssr/node");
|
|
7
|
-
const express_1 = tslib_1.__importDefault(require("express"));
|
|
8
|
-
const node_path_1 = require("node:path");
|
|
9
|
-
function createServer(bootstrap, opts) {
|
|
10
|
-
const serverDistFolder = opts?.serverDistFolder ?? (0, node_path_1.dirname)(__filename);
|
|
11
|
-
const browserDistFolder = opts?.browserDistFolder ?? (0, node_path_1.resolve)(serverDistFolder, '../browser');
|
|
12
|
-
const indexHtml = opts?.indexHtml ?? (0, node_path_1.join)(browserDistFolder, 'index.html');
|
|
13
|
-
const app = (0, express_1.default)();
|
|
14
|
-
const commonEngine = new node_1.CommonEngine();
|
|
15
|
-
app.get('**', express_1.default.static(browserDistFolder, {
|
|
16
|
-
maxAge: '1y',
|
|
17
|
-
index: false,
|
|
18
|
-
}));
|
|
19
|
-
/**
|
|
20
|
-
* Handle all other requests by rendering the Angular application.
|
|
21
|
-
*/
|
|
22
|
-
app.get('**', async (req, res, next) => {
|
|
23
|
-
const { protocol, originalUrl, baseUrl, headers } = req;
|
|
24
|
-
commonEngine
|
|
25
|
-
.render({
|
|
26
|
-
bootstrap,
|
|
27
|
-
documentFilePath: indexHtml,
|
|
28
|
-
url: `${protocol}://${headers.host}${originalUrl}`,
|
|
29
|
-
publicPath: browserDistFolder,
|
|
30
|
-
providers: [{ provide: common_1.APP_BASE_HREF, useValue: baseUrl }],
|
|
31
|
-
})
|
|
32
|
-
.then((html) => {
|
|
33
|
-
res.send(html);
|
|
34
|
-
})
|
|
35
|
-
.catch((err) => next(err));
|
|
36
|
-
});
|
|
37
|
-
return {
|
|
38
|
-
app,
|
|
39
|
-
listen: (port = process.env['PORT']
|
|
40
|
-
? Number.parseInt(process.env['PORT'], 10)
|
|
41
|
-
: 4000) => {
|
|
42
|
-
app.listen(port, () => {
|
|
43
|
-
console.log(`Node Express server listening on http://localhost:${port}`);
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|