@nx/angular-rspack 23.0.0-beta.24 → 23.0.0-beta.25
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 +1 -1
- package/dist/lib/config/config-utils/style-config-utils.js +1 -1
- package/dist/lib/config/config-utils/user-defined-config-helpers.d.ts +3 -3
- package/dist/lib/plugins/client/ssr-reload-client.d.ts +1 -1
- package/dist/lib/plugins/client/ssr-reload-client.d.ts.map +1 -1
- package/dist/lib/plugins/client/ssr-reload-client.js +2 -0
- package/dist/lib/plugins/stats-json-plugin.js +1 -34
- package/dist/lib/plugins/tools/render-worker.d.ts.map +1 -1
- package/dist/lib/plugins/tools/render-worker.js +5 -3
- package/dist/lib/plugins/tools/routes-extractor-worker.d.ts.map +1 -1
- package/dist/lib/plugins/tools/routes-extractor-worker.js +4 -2
- package/package.json +12 -21
- package/eslint.config.mjs +0 -67
|
@@ -148,7 +148,7 @@ async function getProxyConfig(root, proxyConfig) {
|
|
|
148
148
|
switch ((0, node_path_1.extname)(proxyPath)) {
|
|
149
149
|
case '.json': {
|
|
150
150
|
const content = await node_fs_1.promises.readFile(proxyPath, 'utf-8');
|
|
151
|
-
const { parse, printParseErrorCode } = await
|
|
151
|
+
const { parse, printParseErrorCode } = await import('jsonc-parser');
|
|
152
152
|
const parseErrors = [];
|
|
153
153
|
proxyConfiguration = parse(content, parseErrors, {
|
|
154
154
|
allowTrailingComma: true,
|
|
@@ -46,7 +46,7 @@ async function getStylesConfig(buildOptions, hashFormat, platform) {
|
|
|
46
46
|
else {
|
|
47
47
|
const tailwindConfig = await getTailwindConfig(searchDirectories, devkit_1.workspaceRoot);
|
|
48
48
|
if (tailwindConfig) {
|
|
49
|
-
const tailwind = await
|
|
49
|
+
const tailwind = await import(tailwindConfig.package);
|
|
50
50
|
extraPostcssPlugins.push(tailwind.default({ config: tailwindConfig.file }));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -25,9 +25,9 @@ export declare function handleConfigurations(defaultOptions: {
|
|
|
25
25
|
devServer?: import("../../models").DevServerOptions;
|
|
26
26
|
externalDependencies?: string[];
|
|
27
27
|
extractLicenses?: boolean;
|
|
28
|
-
fileReplacements?: import("
|
|
28
|
+
fileReplacements?: import("packages/angular-rspack-compiler/dist").FileReplacement[];
|
|
29
29
|
index?: import("../../models").IndexElement;
|
|
30
|
-
inlineStyleLanguage?: import("
|
|
30
|
+
inlineStyleLanguage?: import("packages/angular-rspack-compiler/dist").InlineStyleLanguage;
|
|
31
31
|
i18nMetadata?: import("../../models").I18nProjectMetadata;
|
|
32
32
|
i18nMissingTranslation?: "warning" | "error" | "ignore";
|
|
33
33
|
i18nDuplicateTranslation?: "warning" | "error" | "ignore";
|
|
@@ -57,7 +57,7 @@ export declare function handleConfigurations(defaultOptions: {
|
|
|
57
57
|
experimentalPlatform?: "node" | "neutral";
|
|
58
58
|
};
|
|
59
59
|
statsJson?: boolean;
|
|
60
|
-
stylePreprocessorOptions?: import("
|
|
60
|
+
stylePreprocessorOptions?: import("packages/angular-rspack-compiler/dist").StylePreprocessorOptions;
|
|
61
61
|
styles?: import("../../models").ScriptOrStyleEntry[];
|
|
62
62
|
subresourceIntegrity?: boolean;
|
|
63
63
|
tsConfig?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=ssr-reload-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-reload-client.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/client/ssr-reload-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ssr-reload-client.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/client/ssr-reload-client.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
// casting is needed to force the type to be the global WebSocket and avoid type errors
|
|
2
4
|
const socket = new WebSocket(`ws://localhost:60000`);
|
|
3
5
|
socket.addEventListener('message', (event) => {
|
|
@@ -6,39 +6,6 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
-
}
|
|
15
|
-
Object.defineProperty(o, k2, desc);
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
-
var ownKeys = function(o) {
|
|
27
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
-
var ar = [];
|
|
29
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
|
-
return ownKeys(o);
|
|
33
|
-
};
|
|
34
|
-
return function (mod) {
|
|
35
|
-
if (mod && mod.__esModule) return mod;
|
|
36
|
-
var result = {};
|
|
37
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
-
__setModuleDefault(result, mod);
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
41
|
-
})();
|
|
42
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
10
|
exports.StatsJsonPlugin = void 0;
|
|
44
11
|
const node_fs_1 = require("node:fs");
|
|
@@ -53,7 +20,7 @@ class StatsJsonPlugin {
|
|
|
53
20
|
}
|
|
54
21
|
apply(compiler) {
|
|
55
22
|
compiler.hooks.done.tapPromise('AngularRspackStatsJsonPlugin', async (stats) => {
|
|
56
|
-
const { stringifyChunked } = await
|
|
23
|
+
const { stringifyChunked } = await import('@discoveryjs/json-ext');
|
|
57
24
|
const data = stats.toJson('verbose');
|
|
58
25
|
try {
|
|
59
26
|
await (0, promises_1.mkdir)((0, node_path_1.dirname)(this.statsOutputPath), { recursive: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-worker.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/tools/render-worker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AA2BD;;GAEG;AACH,iBAAe,MAAM,CAAC,EACpB,SAAS,EACT,SAAS,EACT,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,iBAAiB,GAClB,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"render-worker.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/tools/render-worker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AA2BD;;GAEG;AACH,iBAAe,MAAM,CAAC,EACpB,SAAS,EACT,SAAS,EACT,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,iBAAiB,GAClB,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAqGvC;AAuBD;;;GAGG;;AACH,wBAA4B"}
|
|
@@ -25,7 +25,9 @@ async function render({ indexFile, deployUrl, minifyCss, outputPath, serverBundl
|
|
|
25
25
|
const browserIndexOutputPath = path.join(outputPath, indexFile);
|
|
26
26
|
const outputFolderPath = path.join(outputPath, route);
|
|
27
27
|
const outputIndexPath = path.join(outputFolderPath, 'index.html');
|
|
28
|
-
|
|
28
|
+
// rspack emits a CommonJS server bundle; load with `require` so its named
|
|
29
|
+
// exports resolve (a nodenext `import()` would leave them undefined).
|
|
30
|
+
const { ɵSERVER_CONTEXT, AppServerModule, renderModule, renderApplication, default: bootstrapAppFn, } = require(serverBundlePath);
|
|
29
31
|
(0, node_assert_1.default)(ɵSERVER_CONTEXT, `ɵSERVER_CONTEXT was not exported from: ${serverBundlePath}.`);
|
|
30
32
|
const indexBaseName = fs.existsSync(path.join(outputPath, 'index.original.html'))
|
|
31
33
|
? 'index.original.html'
|
|
@@ -59,7 +61,7 @@ async function render({ indexFile, deployUrl, minifyCss, outputPath, serverBundl
|
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
63
|
if (inlineCriticalCss) {
|
|
62
|
-
const { InlineCriticalCssProcessor } = await
|
|
64
|
+
const { InlineCriticalCssProcessor } = await import('@angular/build/private');
|
|
63
65
|
const inlineCriticalCssProcessor = new InlineCriticalCssProcessor({
|
|
64
66
|
deployUrl: deployUrl,
|
|
65
67
|
minify: minifyCss,
|
|
@@ -93,7 +95,7 @@ function isBootstrapFn(value) {
|
|
|
93
95
|
async function initialize() {
|
|
94
96
|
// Setup Zone.js
|
|
95
97
|
if (zonePackage) {
|
|
96
|
-
await
|
|
98
|
+
await import(zonePackage);
|
|
97
99
|
}
|
|
98
100
|
// Return the render function for use
|
|
99
101
|
return render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-extractor-worker.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/tools/routes-extractor-worker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAgBD,iBAAe,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"routes-extractor-worker.d.ts","sourceRoot":"","sources":["../../../../src/lib/plugins/tools/routes-extractor-worker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAgBD,iBAAe,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAgC1C;AAiBD;;;GAGG;;AACH,wBAA4B"}
|
|
@@ -14,7 +14,9 @@ const path = tslib_1.__importStar(require("node:path"));
|
|
|
14
14
|
const node_worker_threads_1 = require("node:worker_threads");
|
|
15
15
|
const { zonePackage, serverBundlePath, outputPath, indexFile } = node_worker_threads_1.workerData;
|
|
16
16
|
async function extract() {
|
|
17
|
-
|
|
17
|
+
// rspack emits a CommonJS server bundle; load with `require` so its named
|
|
18
|
+
// exports resolve (a nodenext `import()` would leave them undefined).
|
|
19
|
+
const { AppServerModule, ɵgetRoutesFromAngularRouterConfig: getRoutesFromAngularRouterConfig, default: bootstrapAppFn, } = require(serverBundlePath);
|
|
18
20
|
const browserIndexInputPath = path.join(outputPath, indexFile);
|
|
19
21
|
const document = await fs.promises.readFile(browserIndexInputPath, 'utf8');
|
|
20
22
|
const bootstrapAppFnOrModule = bootstrapAppFn || AppServerModule;
|
|
@@ -37,7 +39,7 @@ async function extract() {
|
|
|
37
39
|
async function initialize() {
|
|
38
40
|
// Setup Zone.js
|
|
39
41
|
if (zonePackage) {
|
|
40
|
-
await
|
|
42
|
+
await import(zonePackage);
|
|
41
43
|
}
|
|
42
44
|
return extract;
|
|
43
45
|
}
|
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.25",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,20 +26,28 @@
|
|
|
26
26
|
"main": "./dist/lib/index.js",
|
|
27
27
|
"types": "./dist/lib/index.d.ts",
|
|
28
28
|
"typings": "./dist/lib/index.d.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"!dist/tsconfig.lib.tsbuildinfo"
|
|
32
|
+
],
|
|
29
33
|
"exports": {
|
|
30
34
|
".": {
|
|
35
|
+
"@nx/nx-source": "./src/lib/index.ts",
|
|
31
36
|
"types": "./dist/lib/index.d.ts",
|
|
32
37
|
"default": "./dist/lib/index.js"
|
|
33
38
|
},
|
|
34
39
|
"./loaders/angular-partial-transform-loader": {
|
|
40
|
+
"@nx/nx-source": "./src/lib/plugins/loaders/angular-partial-transform.loader.ts",
|
|
35
41
|
"types": "./dist/lib/plugins/loaders/angular-partial-transform.loader.d.ts",
|
|
36
42
|
"default": "./dist/lib/plugins/loaders/angular-partial-transform.loader.js"
|
|
37
43
|
},
|
|
38
44
|
"./loaders/angular-loader": {
|
|
45
|
+
"@nx/nx-source": "./src/lib/plugins/loaders/angular-transform.loader.ts",
|
|
39
46
|
"types": "./dist/lib/plugins/loaders/angular-transform.loader.d.ts",
|
|
40
47
|
"default": "./dist/lib/plugins/loaders/angular-transform.loader.js"
|
|
41
48
|
},
|
|
42
49
|
"./loaders/platform-server-exports-loader": {
|
|
50
|
+
"@nx/nx-source": "./src/lib/plugins/loaders/platform-server-exports.loader.ts",
|
|
43
51
|
"types": "./dist/lib/plugins/loaders/platform-server-exports.loader.d.ts",
|
|
44
52
|
"default": "./dist/lib/plugins/loaders/platform-server-exports.loader.js"
|
|
45
53
|
}
|
|
@@ -48,8 +56,6 @@
|
|
|
48
56
|
"@ampproject/remapping": "2.3.0",
|
|
49
57
|
"@babel/core": "^7.23.2",
|
|
50
58
|
"@discoveryjs/json-ext": "0.6.3",
|
|
51
|
-
"@nx/angular-rspack-compiler": "23.0.0-beta.24",
|
|
52
|
-
"@nx/devkit": "23.0.0-beta.24",
|
|
53
59
|
"ansi-colors": "4.1.3",
|
|
54
60
|
"autoprefixer": "^10.4.9",
|
|
55
61
|
"deepmerge": "^4.3.1",
|
|
@@ -71,7 +77,9 @@
|
|
|
71
77
|
"source-map-loader": "^5.0.0",
|
|
72
78
|
"tslib": "^2.3.0",
|
|
73
79
|
"webpack-merge": "^6.0.1",
|
|
74
|
-
"ws": "^8.18.0"
|
|
80
|
+
"ws": "^8.18.0",
|
|
81
|
+
"@nx/angular-rspack-compiler": "23.0.0-beta.25",
|
|
82
|
+
"@nx/devkit": "23.0.0-beta.25"
|
|
75
83
|
},
|
|
76
84
|
"devDependencies": {
|
|
77
85
|
"jsonc-eslint-parser": "^2.4.0"
|
|
@@ -103,14 +111,6 @@
|
|
|
103
111
|
"name": "angular-rspack",
|
|
104
112
|
"sourceRoot": "packages/angular-rspack/src",
|
|
105
113
|
"projectType": "library",
|
|
106
|
-
"release": {
|
|
107
|
-
"version": {
|
|
108
|
-
"preserveLocalDependencyProtocols": false,
|
|
109
|
-
"manifestRootsToUpdate": [
|
|
110
|
-
"packages/{projectName}"
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
114
|
"targets": {
|
|
115
115
|
"build": {
|
|
116
116
|
"command": "node ./scripts/copy-readme.js angular-rspack packages/angular-rspack/readme-template.md packages/angular-rspack/README.md",
|
|
@@ -132,15 +132,6 @@
|
|
|
132
132
|
"--passWithNoTests"
|
|
133
133
|
]
|
|
134
134
|
}
|
|
135
|
-
},
|
|
136
|
-
"nx-release-publish": {
|
|
137
|
-
"executor": "@nx/js:release-publish",
|
|
138
|
-
"options": {
|
|
139
|
-
"packageRoot": "packages/angular-rspack"
|
|
140
|
-
},
|
|
141
|
-
"dependsOn": [
|
|
142
|
-
"^nx-release-publish"
|
|
143
|
-
]
|
|
144
135
|
}
|
|
145
136
|
}
|
|
146
137
|
},
|
package/eslint.config.mjs
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { baseConfig } from '../../eslint.config.mjs';
|
|
2
|
-
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
...baseConfig,
|
|
6
|
-
{
|
|
7
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
8
|
-
rules: {
|
|
9
|
-
'no-restricted-imports': [
|
|
10
|
-
'error',
|
|
11
|
-
{
|
|
12
|
-
name: 'chalk',
|
|
13
|
-
message:
|
|
14
|
-
'Please use `picocolors` in place of `chalk` for rendering terminal colors',
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
files: ['./package.json'],
|
|
21
|
-
rules: {
|
|
22
|
-
'@nx/nx-plugin-checks': 'error',
|
|
23
|
-
'@nx/dependency-checks': [
|
|
24
|
-
'error',
|
|
25
|
-
{
|
|
26
|
-
buildTargets: ['build-base'],
|
|
27
|
-
ignoredFiles: [
|
|
28
|
-
'{projectRoot}/eslint.config.mjs',
|
|
29
|
-
'{projectRoot}/vite.config.{js,ts,mjs,mts}',
|
|
30
|
-
],
|
|
31
|
-
ignoredDependencies: [
|
|
32
|
-
'@rspack/core',
|
|
33
|
-
'@angular/core',
|
|
34
|
-
'jsonc-eslint-parser',
|
|
35
|
-
'vitest',
|
|
36
|
-
'memfs',
|
|
37
|
-
'sass',
|
|
38
|
-
'tailwindcss',
|
|
39
|
-
'@babel/core',
|
|
40
|
-
'autoprefixer',
|
|
41
|
-
'css-loader',
|
|
42
|
-
'jsonc-parser',
|
|
43
|
-
'less-loader',
|
|
44
|
-
'loader-utils',
|
|
45
|
-
'open',
|
|
46
|
-
'ora',
|
|
47
|
-
'parse5-html-rewriting-stream',
|
|
48
|
-
'piscina',
|
|
49
|
-
'postcss',
|
|
50
|
-
'postcss-loader',
|
|
51
|
-
'rxjs',
|
|
52
|
-
'sass-loader',
|
|
53
|
-
'sass-embedded',
|
|
54
|
-
'webpack-merge',
|
|
55
|
-
'ws',
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
languageOptions: {
|
|
61
|
-
parser: jsoncEslintParser,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
ignores: ['dist'],
|
|
66
|
-
},
|
|
67
|
-
];
|