@angular/build 18.1.0-next.3 → 18.1.0-rc.1
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/package.json +9 -7
- package/src/builders/application/chunk-optimizer.d.ts +9 -0
- package/src/builders/application/chunk-optimizer.js +169 -0
- package/src/builders/application/execute-build.js +9 -3
- package/src/builders/application/execute-post-bundle.js +4 -4
- package/src/builders/application/index.d.ts +1 -1
- package/src/builders/dev-server/index.d.ts +3 -3
- package/src/builders/dev-server/internal.d.ts +3 -3
- package/src/builders/dev-server/vite-server.js +1 -5
- package/src/index.d.ts +2 -2
- package/src/private.d.ts +6 -5
- package/src/private.js +4 -2
- package/src/tools/{esbuild/angular → angular}/compilation/angular-compilation.js +3 -3
- package/src/tools/{esbuild/angular → angular}/compilation/aot-compilation.js +3 -3
- package/src/tools/{esbuild/angular → angular}/compilation/factory.js +1 -1
- package/src/tools/{esbuild/angular → angular}/compilation/jit-compilation.js +3 -3
- package/src/tools/{esbuild/angular → angular}/compilation/parallel-worker.js +1 -1
- package/src/tools/{esbuild/angular → angular/transformers}/jit-resource-transformer.js +1 -1
- package/src/tools/babel/plugins/adjust-static-class-members.js +0 -1
- package/src/tools/esbuild/angular/compiler-plugin.js +18 -3
- package/src/tools/esbuild/angular/jit-plugin-callbacks.js +1 -1
- package/src/tools/esbuild/application-code-bundle.js +7 -2
- package/src/tools/esbuild/budget-stats.d.ts +2 -2
- package/src/tools/esbuild/budget-stats.js +19 -14
- package/src/tools/esbuild/bundler-context.d.ts +2 -0
- package/src/tools/esbuild/bundler-context.js +6 -3
- package/src/tools/esbuild/bundler-execution-result.d.ts +1 -1
- package/src/tools/esbuild/bundler-execution-result.js +1 -1
- package/src/tools/esbuild/i18n-inliner.js +2 -2
- package/src/tools/esbuild/javascript-transformer-worker.js +3 -1
- package/src/tools/esbuild/utils.d.ts +4 -3
- package/src/tools/esbuild/utils.js +97 -56
- package/src/tools/esbuild/wasm-plugin.d.ts +28 -0
- package/src/tools/esbuild/wasm-plugin.js +209 -0
- package/src/tools/esbuild/wasm.d.ts +25 -0
- package/src/tools/vite/angular-memory-plugin.d.ts +2 -5
- package/src/tools/vite/angular-memory-plugin.js +7 -161
- package/src/tools/vite/middlewares/assets-middleware.d.ts +10 -0
- package/src/tools/vite/middlewares/assets-middleware.js +94 -0
- package/src/tools/vite/middlewares/html-fallback-middleware.d.ts +10 -0
- package/src/tools/vite/middlewares/html-fallback-middleware.js +24 -0
- package/src/tools/vite/middlewares/index-html-middleware.d.ts +10 -0
- package/src/tools/vite/middlewares/index-html-middleware.js +43 -0
- package/src/tools/vite/middlewares/index.d.ts +11 -0
- package/src/tools/vite/middlewares/index.js +18 -0
- package/src/tools/vite/middlewares/ssr-middleware.d.ts +12 -0
- package/src/tools/vite/middlewares/ssr-middleware.js +57 -0
- package/src/tools/vite/utils.d.ts +16 -0
- package/src/tools/vite/utils.js +40 -0
- package/src/utils/bundle-calculator.d.ts +1 -1
- package/src/utils/environment-options.d.ts +1 -0
- package/src/utils/environment-options.js +4 -2
- package/src/utils/index-file/inline-fonts.js +1 -1
- package/src/utils/normalize-cache.js +1 -1
- /package/src/tools/{esbuild/angular → angular}/angular-host.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/angular-host.js +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/angular-compilation.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/aot-compilation.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/factory.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/index.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/index.js +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/jit-compilation.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/noop-compilation.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/noop-compilation.js +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/parallel-compilation.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/parallel-compilation.js +0 -0
- /package/src/tools/{esbuild/angular → angular}/compilation/parallel-worker.d.ts +0 -0
- /package/src/tools/{esbuild/angular/compilation → angular/transformers}/jit-bootstrap-transformer.d.ts +0 -0
- /package/src/tools/{esbuild/angular/compilation → angular/transformers}/jit-bootstrap-transformer.js +0 -0
- /package/src/tools/{esbuild/angular → angular/transformers}/jit-resource-transformer.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular/transformers}/web-worker-transformer.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular/transformers}/web-worker-transformer.js +0 -0
- /package/src/tools/{esbuild/angular → angular}/uri.d.ts +0 -0
- /package/src/tools/{esbuild/angular → angular}/uri.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/build",
|
|
3
|
-
"version": "18.1.0-
|
|
3
|
+
"version": "18.1.0-rc.1",
|
|
4
4
|
"description": "Official build system for Angular",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Angular CLI",
|
|
@@ -23,29 +23,31 @@
|
|
|
23
23
|
"builders": "builders.json",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ampproject/remapping": "2.3.0",
|
|
26
|
-
"@angular-devkit/architect": "0.1801.0-
|
|
26
|
+
"@angular-devkit/architect": "0.1801.0-rc.1",
|
|
27
27
|
"@babel/core": "7.24.7",
|
|
28
28
|
"@babel/helper-annotate-as-pure": "7.24.7",
|
|
29
29
|
"@babel/helper-split-export-declaration": "7.24.7",
|
|
30
|
-
"@
|
|
30
|
+
"@babel/plugin-syntax-import-attributes": "7.24.7",
|
|
31
|
+
"@inquirer/confirm": "3.1.11",
|
|
31
32
|
"@vitejs/plugin-basic-ssl": "1.1.0",
|
|
32
33
|
"ansi-colors": "4.1.3",
|
|
33
34
|
"browserslist": "^4.23.0",
|
|
34
|
-
"critters": "0.0.
|
|
35
|
+
"critters": "0.0.24",
|
|
35
36
|
"esbuild": "0.21.5",
|
|
36
37
|
"fast-glob": "3.3.2",
|
|
37
|
-
"https-proxy-agent": "7.0.
|
|
38
|
+
"https-proxy-agent": "7.0.5",
|
|
38
39
|
"lmdb": "3.0.12",
|
|
39
40
|
"magic-string": "0.30.10",
|
|
40
41
|
"mrmime": "2.0.0",
|
|
41
42
|
"ora": "5.4.1",
|
|
42
43
|
"parse5-html-rewriting-stream": "7.0.0",
|
|
43
44
|
"picomatch": "4.0.2",
|
|
44
|
-
"piscina": "4.6.
|
|
45
|
+
"piscina": "4.6.1",
|
|
46
|
+
"rollup": "4.18.0",
|
|
45
47
|
"sass": "1.77.6",
|
|
46
48
|
"semver": "7.6.2",
|
|
47
49
|
"undici": "6.19.2",
|
|
48
|
-
"vite": "5.3.
|
|
50
|
+
"vite": "5.3.2",
|
|
49
51
|
"watchpack": "2.4.1"
|
|
50
52
|
},
|
|
51
53
|
"peerDependencies": {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { BundleContextResult } from '../../tools/esbuild/bundler-context';
|
|
9
|
+
export declare function optimizeChunks(original: BundleContextResult, sourcemap: boolean | 'hidden'): Promise<BundleContextResult>;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.optimizeChunks = optimizeChunks;
|
|
14
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
15
|
+
const rollup_1 = require("rollup");
|
|
16
|
+
const bundler_context_1 = require("../../tools/esbuild/bundler-context");
|
|
17
|
+
const utils_1 = require("../../tools/esbuild/utils");
|
|
18
|
+
const error_1 = require("../../utils/error");
|
|
19
|
+
async function optimizeChunks(original, sourcemap) {
|
|
20
|
+
// Failed builds cannot be optimized
|
|
21
|
+
if (original.errors) {
|
|
22
|
+
return original;
|
|
23
|
+
}
|
|
24
|
+
// Find the main browser entrypoint
|
|
25
|
+
let mainFile;
|
|
26
|
+
for (const [file, record] of original.initialFiles) {
|
|
27
|
+
if (record.name === 'main' &&
|
|
28
|
+
record.entrypoint &&
|
|
29
|
+
!record.serverFile &&
|
|
30
|
+
record.type === 'script') {
|
|
31
|
+
mainFile = file;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// No action required if no browser main entrypoint
|
|
36
|
+
if (!mainFile) {
|
|
37
|
+
return original;
|
|
38
|
+
}
|
|
39
|
+
const chunks = {};
|
|
40
|
+
const maps = {};
|
|
41
|
+
for (const originalFile of original.outputFiles) {
|
|
42
|
+
if (originalFile.type !== bundler_context_1.BuildOutputFileType.Browser) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (originalFile.path.endsWith('.js')) {
|
|
46
|
+
chunks[originalFile.path] = originalFile;
|
|
47
|
+
}
|
|
48
|
+
else if (originalFile.path.endsWith('.js.map')) {
|
|
49
|
+
// Create mapping of JS file to sourcemap content
|
|
50
|
+
maps[originalFile.path.slice(0, -4)] = originalFile;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const usedChunks = new Set();
|
|
54
|
+
let bundle;
|
|
55
|
+
let optimizedOutput;
|
|
56
|
+
try {
|
|
57
|
+
bundle = await (0, rollup_1.rollup)({
|
|
58
|
+
input: mainFile,
|
|
59
|
+
plugins: [
|
|
60
|
+
{
|
|
61
|
+
name: 'angular-bundle',
|
|
62
|
+
resolveId(source) {
|
|
63
|
+
// Remove leading `./` if present
|
|
64
|
+
const file = source[0] === '.' && source[1] === '/' ? source.slice(2) : source;
|
|
65
|
+
if (chunks[file]) {
|
|
66
|
+
return file;
|
|
67
|
+
}
|
|
68
|
+
// All other identifiers are considered external to maintain behavior
|
|
69
|
+
return { id: source, external: true };
|
|
70
|
+
},
|
|
71
|
+
load(id) {
|
|
72
|
+
(0, node_assert_1.default)(chunks[id], `Angular chunk content should always be present in chunk optimizer [${id}].`);
|
|
73
|
+
usedChunks.add(id);
|
|
74
|
+
const result = {
|
|
75
|
+
code: chunks[id].text,
|
|
76
|
+
map: maps[id]?.text,
|
|
77
|
+
};
|
|
78
|
+
return result;
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
});
|
|
83
|
+
const result = await bundle.generate({
|
|
84
|
+
compact: true,
|
|
85
|
+
sourcemap,
|
|
86
|
+
chunkFileNames(chunkInfo) {
|
|
87
|
+
// Do not add hash to file name if already present
|
|
88
|
+
return /-[a-zA-Z0-9]{8}$/.test(chunkInfo.name) ? '[name].js' : '[name]-[hash].js';
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
optimizedOutput = result.output;
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
(0, error_1.assertIsError)(e);
|
|
95
|
+
return {
|
|
96
|
+
errors: [
|
|
97
|
+
// Most of these fields are not actually needed for printing the error
|
|
98
|
+
{
|
|
99
|
+
id: '',
|
|
100
|
+
text: 'Chunk optimization failed',
|
|
101
|
+
detail: undefined,
|
|
102
|
+
pluginName: '',
|
|
103
|
+
location: null,
|
|
104
|
+
notes: [
|
|
105
|
+
{
|
|
106
|
+
text: e.message,
|
|
107
|
+
location: null,
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
warnings: original.warnings,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
await bundle?.close();
|
|
117
|
+
}
|
|
118
|
+
// Remove used chunks and associated sourcemaps from the original result
|
|
119
|
+
original.outputFiles = original.outputFiles.filter((file) => !usedChunks.has(file.path) &&
|
|
120
|
+
!(file.path.endsWith('.map') && usedChunks.has(file.path.slice(0, -4))));
|
|
121
|
+
// Add new optimized chunks
|
|
122
|
+
const importsPerFile = {};
|
|
123
|
+
for (const optimizedFile of optimizedOutput) {
|
|
124
|
+
if (optimizedFile.type !== 'chunk') {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
importsPerFile[optimizedFile.fileName] = optimizedFile.imports;
|
|
128
|
+
original.outputFiles.push((0, utils_1.createOutputFile)(optimizedFile.fileName, optimizedFile.code, bundler_context_1.BuildOutputFileType.Browser));
|
|
129
|
+
if (optimizedFile.map && optimizedFile.sourcemapFileName) {
|
|
130
|
+
original.outputFiles.push((0, utils_1.createOutputFile)(optimizedFile.sourcemapFileName, optimizedFile.map.toString(), bundler_context_1.BuildOutputFileType.Browser));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// Update initial files to reflect optimized chunks
|
|
134
|
+
const entriesToAnalyze = [];
|
|
135
|
+
for (const usedFile of usedChunks) {
|
|
136
|
+
// Leave the main file since its information did not change
|
|
137
|
+
if (usedFile === mainFile) {
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
139
|
+
entriesToAnalyze.push([mainFile, original.initialFiles.get(mainFile)]);
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
// Remove all other used chunks
|
|
143
|
+
original.initialFiles.delete(usedFile);
|
|
144
|
+
}
|
|
145
|
+
// Analyze for transitive initial files
|
|
146
|
+
let currentEntry;
|
|
147
|
+
while ((currentEntry = entriesToAnalyze.pop())) {
|
|
148
|
+
const [entryPath, entryRecord] = currentEntry;
|
|
149
|
+
for (const importPath of importsPerFile[entryPath]) {
|
|
150
|
+
const existingRecord = original.initialFiles.get(importPath);
|
|
151
|
+
if (existingRecord) {
|
|
152
|
+
// Store the smallest value depth
|
|
153
|
+
if (existingRecord.depth > entryRecord.depth + 1) {
|
|
154
|
+
existingRecord.depth = entryRecord.depth + 1;
|
|
155
|
+
}
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
const record = {
|
|
159
|
+
type: 'script',
|
|
160
|
+
entrypoint: false,
|
|
161
|
+
external: false,
|
|
162
|
+
serverFile: false,
|
|
163
|
+
depth: entryRecord.depth + 1,
|
|
164
|
+
};
|
|
165
|
+
entriesToAnalyze.push([importPath, record]);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return original;
|
|
169
|
+
}
|
|
@@ -14,10 +14,13 @@ const bundler_context_1 = require("../../tools/esbuild/bundler-context");
|
|
|
14
14
|
const bundler_execution_result_1 = require("../../tools/esbuild/bundler-execution-result");
|
|
15
15
|
const commonjs_checker_1 = require("../../tools/esbuild/commonjs-checker");
|
|
16
16
|
const license_extractor_1 = require("../../tools/esbuild/license-extractor");
|
|
17
|
+
const profiling_1 = require("../../tools/esbuild/profiling");
|
|
17
18
|
const utils_1 = require("../../tools/esbuild/utils");
|
|
18
19
|
const bundle_calculator_1 = require("../../utils/bundle-calculator");
|
|
20
|
+
const environment_options_1 = require("../../utils/environment-options");
|
|
19
21
|
const resolve_assets_1 = require("../../utils/resolve-assets");
|
|
20
22
|
const supported_browsers_1 = require("../../utils/supported-browsers");
|
|
23
|
+
const chunk_optimizer_1 = require("./chunk-optimizer");
|
|
21
24
|
const execute_post_bundle_1 = require("./execute-post-bundle");
|
|
22
25
|
const i18n_1 = require("./i18n");
|
|
23
26
|
const setup_bundling_1 = require("./setup-bundling");
|
|
@@ -37,7 +40,10 @@ async function executeBuild(options, context, rebuildState) {
|
|
|
37
40
|
if (bundlerContexts === undefined) {
|
|
38
41
|
bundlerContexts = (0, setup_bundling_1.setupBundlerContexts)(options, browsers, codeBundleCache);
|
|
39
42
|
}
|
|
40
|
-
|
|
43
|
+
let bundlingResult = await bundler_context_1.BundlerContext.bundleAll(bundlerContexts, rebuildState?.fileChanges.all);
|
|
44
|
+
if (options.optimizationOptions.scripts && environment_options_1.shouldOptimizeChunks) {
|
|
45
|
+
bundlingResult = await (0, profiling_1.profileAsync)('OPTIMIZE_CHUNKS', () => (0, chunk_optimizer_1.optimizeChunks)(bundlingResult, options.sourcemapOptions.scripts ? !options.sourcemapOptions.hidden || 'hidden' : false));
|
|
46
|
+
}
|
|
41
47
|
const executionResult = new bundler_execution_result_1.ExecutionResult(bundlerContexts, codeBundleCache);
|
|
42
48
|
executionResult.addWarnings(bundlingResult.warnings);
|
|
43
49
|
// Return if the bundling has errors
|
|
@@ -63,7 +69,7 @@ async function executeBuild(options, context, rebuildState) {
|
|
|
63
69
|
// Analyze files for bundle budget failures if present
|
|
64
70
|
let budgetFailures;
|
|
65
71
|
if (options.budgets) {
|
|
66
|
-
const compatStats = (0, budget_stats_1.generateBudgetStats)(metafile, initialFiles);
|
|
72
|
+
const compatStats = (0, budget_stats_1.generateBudgetStats)(metafile, outputFiles, initialFiles);
|
|
67
73
|
budgetFailures = [...(0, bundle_calculator_1.checkBudgets)(options.budgets, compatStats, true)];
|
|
68
74
|
for (const { message, severity } of budgetFailures) {
|
|
69
75
|
if (severity === 'error') {
|
|
@@ -122,7 +128,7 @@ async function executeBuild(options, context, rebuildState) {
|
|
|
122
128
|
executionResult.addOutputFile('stats.json', JSON.stringify(metafile, null, 2), bundler_context_1.BuildOutputFileType.Root);
|
|
123
129
|
}
|
|
124
130
|
if (!jsonLogs) {
|
|
125
|
-
executionResult.addLog((0, utils_1.logBuildStats)(metafile, initialFiles, budgetFailures, colors, changedFiles, estimatedTransferSizes, !!ssrOptions, verbose));
|
|
131
|
+
executionResult.addLog((0, utils_1.logBuildStats)(metafile, outputFiles, initialFiles, budgetFailures, colors, changedFiles, estimatedTransferSizes, !!ssrOptions, verbose));
|
|
126
132
|
}
|
|
127
133
|
return executionResult;
|
|
128
134
|
}
|
|
@@ -48,10 +48,10 @@ async function executePostBundleSteps(options, outputFiles, assetFiles, initialF
|
|
|
48
48
|
const { csrContent, ssrContent, errors, warnings } = await (0, index_html_generator_1.generateIndexHtml)(initialFiles, outputFiles, options, locale);
|
|
49
49
|
allErrors.push(...errors);
|
|
50
50
|
allWarnings.push(...warnings);
|
|
51
|
-
additionalHtmlOutputFiles.set(indexHtmlOptions.output, (0, utils_1.
|
|
51
|
+
additionalHtmlOutputFiles.set(indexHtmlOptions.output, (0, utils_1.createOutputFile)(indexHtmlOptions.output, csrContent, bundler_context_1.BuildOutputFileType.Browser));
|
|
52
52
|
if (ssrContent) {
|
|
53
53
|
const serverIndexHtmlFilename = 'index.server.html';
|
|
54
|
-
additionalHtmlOutputFiles.set(serverIndexHtmlFilename, (0, utils_1.
|
|
54
|
+
additionalHtmlOutputFiles.set(serverIndexHtmlFilename, (0, utils_1.createOutputFile)(serverIndexHtmlFilename, ssrContent, bundler_context_1.BuildOutputFileType.Server));
|
|
55
55
|
ssrIndexContent = ssrContent;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -64,7 +64,7 @@ async function executePostBundleSteps(options, outputFiles, assetFiles, initialF
|
|
|
64
64
|
allWarnings.push(...warnings);
|
|
65
65
|
prerenderedRoutes.push(...Array.from(generatedRoutes));
|
|
66
66
|
for (const [path, content] of Object.entries(output)) {
|
|
67
|
-
additionalHtmlOutputFiles.set(path, (0, utils_1.
|
|
67
|
+
additionalHtmlOutputFiles.set(path, (0, utils_1.createOutputFile)(path, content, bundler_context_1.BuildOutputFileType.Browser));
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
additionalOutputFiles.push(...additionalHtmlOutputFiles.values());
|
|
@@ -75,7 +75,7 @@ async function executePostBundleSteps(options, outputFiles, assetFiles, initialF
|
|
|
75
75
|
const serviceWorkerResult = await (0, service_worker_1.augmentAppWithServiceWorkerEsbuild)(workspaceRoot, serviceWorker, options.baseHref || '/', options.indexHtmlOptions?.output,
|
|
76
76
|
// Ensure additional files recently added are used
|
|
77
77
|
[...outputFiles, ...additionalOutputFiles], assetFiles);
|
|
78
|
-
additionalOutputFiles.push((0, utils_1.
|
|
78
|
+
additionalOutputFiles.push((0, utils_1.createOutputFile)('ngsw.json', serviceWorkerResult.manifest, bundler_context_1.BuildOutputFileType.Browser));
|
|
79
79
|
additionalAssets.push(...serviceWorkerResult.assetFiles);
|
|
80
80
|
}
|
|
81
81
|
catch (error) {
|
|
@@ -10,7 +10,7 @@ import type { Plugin } from 'esbuild';
|
|
|
10
10
|
import { BuildOutputFile } from '../../tools/esbuild/bundler-context';
|
|
11
11
|
import { ApplicationBuilderExtensions, ApplicationBuilderInternalOptions } from './options';
|
|
12
12
|
import { Schema as ApplicationBuilderOptions } from './schema';
|
|
13
|
-
export { ApplicationBuilderOptions };
|
|
13
|
+
export type { ApplicationBuilderOptions };
|
|
14
14
|
export declare function buildApplicationInternal(options: ApplicationBuilderInternalOptions, context: BuilderContext & {
|
|
15
15
|
signal?: AbortSignal;
|
|
16
16
|
}, infrastructureSettings?: {
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
8
|
import { execute } from './builder';
|
|
9
|
-
import { DevServerBuilderOutput } from './output';
|
|
10
|
-
import { Schema as DevServerBuilderOptions } from './schema';
|
|
11
|
-
export { DevServerBuilderOptions, DevServerBuilderOutput, execute as executeDevServerBuilder };
|
|
9
|
+
import type { DevServerBuilderOutput } from './output';
|
|
10
|
+
import type { Schema as DevServerBuilderOptions } from './schema';
|
|
11
|
+
export { type DevServerBuilderOptions, type DevServerBuilderOutput, execute as executeDevServerBuilder, };
|
|
12
12
|
declare const _default: import("../../../../../angular_devkit/architect/src/internal").Builder<DevServerBuilderOptions & import("../../../../../angular_devkit/core/src").JsonObject>;
|
|
13
13
|
export default _default;
|
|
14
14
|
export { execute as executeDevServer };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
export { BuildOutputFile, BuildOutputFileType } from '@angular/build';
|
|
8
|
+
export { type BuildOutputFile, BuildOutputFileType } from '@angular/build';
|
|
9
9
|
export { createRxjsEsmResolutionPlugin } from '../../tools/esbuild/rxjs-esm-resolution-plugin';
|
|
10
10
|
export { JavaScriptTransformer } from '../../tools/esbuild/javascript-transformer';
|
|
11
11
|
export { getFeatureSupport, isZonelessApp } from '../../tools/esbuild/utils';
|
|
@@ -15,5 +15,5 @@ export { purgeStaleBuildCache } from '../../utils/purge-cache';
|
|
|
15
15
|
export { getSupportedBrowsers } from '../../utils/supported-browsers';
|
|
16
16
|
export { transformSupportedBrowsersToTargets } from '../../tools/esbuild/utils';
|
|
17
17
|
export { buildApplicationInternal } from '../../builders/application';
|
|
18
|
-
export { ApplicationBuilderInternalOptions } from '../../builders/application/options';
|
|
19
|
-
export { ExternalResultMetadata } from '../../tools/esbuild/bundler-execution-result';
|
|
18
|
+
export type { ApplicationBuilderInternalOptions } from '../../builders/application/options';
|
|
19
|
+
export type { ExternalResultMetadata } from '../../tools/esbuild/bundler-execution-result';
|
|
@@ -193,7 +193,7 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
|
|
|
193
193
|
server.config.server.fs.allow = [
|
|
194
194
|
...new Set([...server.config.server.fs.allow, ...assetFiles.values()]),
|
|
195
195
|
];
|
|
196
|
-
|
|
196
|
+
handleUpdate(normalizePath, generatedFiles, server, serverOptions, context.logger);
|
|
197
197
|
if (requiresServerRestart) {
|
|
198
198
|
// Restart the server to force SSR dep re-optimization when a dependency has been added.
|
|
199
199
|
// This is a workaround for: https://github.com/vitejs/vite/issues/14896
|
|
@@ -436,7 +436,6 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
|
|
|
436
436
|
outputFiles,
|
|
437
437
|
assets,
|
|
438
438
|
ssr,
|
|
439
|
-
extraHeaders: serverOptions.headers,
|
|
440
439
|
external: externalMetadata.explicit,
|
|
441
440
|
indexHtmlTransformer,
|
|
442
441
|
extensionMiddleware,
|
|
@@ -491,9 +490,6 @@ function getDepOptimizationConfig({ disabled, exclude, include, target, zoneless
|
|
|
491
490
|
},
|
|
492
491
|
},
|
|
493
492
|
];
|
|
494
|
-
if (ssr) {
|
|
495
|
-
plugins.unshift((0, internal_1.createRxjsEsmResolutionPlugin)());
|
|
496
|
-
}
|
|
497
493
|
return {
|
|
498
494
|
// Exclude any explicitly defined dependencies (currently build defined externals)
|
|
499
495
|
exclude,
|
package/src/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
export { buildApplication, type ApplicationBuilderOptions, type ApplicationBuilderOutput, } from './builders/application';
|
|
9
9
|
export { type BuildOutputFile, BuildOutputFileType } from './tools/esbuild/bundler-context';
|
|
10
10
|
export type { BuildOutputAsset } from './tools/esbuild/bundler-execution-result';
|
|
11
|
-
export { executeDevServerBuilder, DevServerBuilderOptions, DevServerBuilderOutput, } from './builders/dev-server';
|
|
12
|
-
export { execute as executeExtractI18nBuilder, ExtractI18nBuilderOptions, } from './builders/extract-i18n';
|
|
11
|
+
export { executeDevServerBuilder, type DevServerBuilderOptions, type DevServerBuilderOutput, } from './builders/dev-server';
|
|
12
|
+
export { execute as executeExtractI18nBuilder, type ExtractI18nBuilderOptions, } from './builders/extract-i18n';
|
package/src/private.d.ts
CHANGED
|
@@ -12,20 +12,21 @@
|
|
|
12
12
|
* their existence may change in any future version.
|
|
13
13
|
*/
|
|
14
14
|
export { buildApplicationInternal } from './builders/application';
|
|
15
|
-
export { ApplicationBuilderInternalOptions } from './builders/application/options';
|
|
15
|
+
export type { ApplicationBuilderInternalOptions } from './builders/application/options';
|
|
16
16
|
export { serveWithVite } from './builders/dev-server/vite-server';
|
|
17
17
|
export * from './tools/babel/plugins';
|
|
18
|
-
export { ExternalResultMetadata } from './tools/esbuild/bundler-execution-result';
|
|
18
|
+
export type { ExternalResultMetadata } from './tools/esbuild/bundler-execution-result';
|
|
19
19
|
export { emitFilesToDisk } from './tools/esbuild/utils';
|
|
20
20
|
export { transformSupportedBrowsersToTargets } from './tools/esbuild/utils';
|
|
21
21
|
export { SassWorkerImplementation } from './tools/sass/sass-service';
|
|
22
22
|
export { SourceFileCache } from './tools/esbuild/angular/source-file-cache';
|
|
23
|
-
export { createJitResourceTransformer } from './tools/
|
|
23
|
+
export { createJitResourceTransformer } from './tools/angular/transformers/jit-resource-transformer';
|
|
24
24
|
export { JavaScriptTransformer } from './tools/esbuild/javascript-transformer';
|
|
25
|
+
export { createCompilerPlugin } from './tools/esbuild/angular/compiler-plugin';
|
|
25
26
|
export * from './utils/bundle-calculator';
|
|
26
27
|
export { checkPort } from './utils/check-port';
|
|
27
28
|
export { deleteOutputDir } from './utils/delete-output-dir';
|
|
28
|
-
export { I18nOptions, createI18nOptions, loadTranslations } from './utils/i18n-options';
|
|
29
|
+
export { type I18nOptions, createI18nOptions, loadTranslations } from './utils/i18n-options';
|
|
29
30
|
export { IndexHtmlGenerator, type IndexHtmlGeneratorOptions, type IndexHtmlGeneratorProcessOptions, type IndexHtmlTransform, } from './utils/index-file/index-html-generator';
|
|
30
31
|
export type { FileInfo } from './utils/index-file/augment-index-html';
|
|
31
32
|
export { type InlineCriticalCssProcessOptions, InlineCriticalCssProcessor, type InlineCriticalCssProcessorOptions, } from './utils/index-file/inline-critical-css';
|
|
@@ -33,6 +34,6 @@ export { loadProxyConfiguration } from './utils/load-proxy-config';
|
|
|
33
34
|
export { type TranslationLoader, createTranslationLoader } from './utils/load-translations';
|
|
34
35
|
export { purgeStaleBuildCache } from './utils/purge-cache';
|
|
35
36
|
export { augmentAppWithServiceWorker } from './utils/service-worker';
|
|
36
|
-
export { BundleStats, generateBuildStatsTable } from './utils/stats-table';
|
|
37
|
+
export { type BundleStats, generateBuildStatsTable } from './utils/stats-table';
|
|
37
38
|
export { getSupportedBrowsers } from './utils/supported-browsers';
|
|
38
39
|
export { assertCompatibleAngularVersion } from './utils/version';
|
package/src/private.js
CHANGED
|
@@ -21,7 +21,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.assertCompatibleAngularVersion = exports.getSupportedBrowsers = exports.generateBuildStatsTable = exports.augmentAppWithServiceWorker = exports.purgeStaleBuildCache = exports.createTranslationLoader = exports.loadProxyConfiguration = exports.InlineCriticalCssProcessor = exports.IndexHtmlGenerator = exports.loadTranslations = exports.createI18nOptions = exports.deleteOutputDir = exports.checkPort = exports.JavaScriptTransformer = exports.createJitResourceTransformer = exports.SourceFileCache = exports.SassWorkerImplementation = exports.transformSupportedBrowsersToTargets = exports.emitFilesToDisk = exports.serveWithVite = exports.buildApplicationInternal = void 0;
|
|
24
|
+
exports.assertCompatibleAngularVersion = exports.getSupportedBrowsers = exports.generateBuildStatsTable = exports.augmentAppWithServiceWorker = exports.purgeStaleBuildCache = exports.createTranslationLoader = exports.loadProxyConfiguration = exports.InlineCriticalCssProcessor = exports.IndexHtmlGenerator = exports.loadTranslations = exports.createI18nOptions = exports.deleteOutputDir = exports.checkPort = exports.createCompilerPlugin = exports.JavaScriptTransformer = exports.createJitResourceTransformer = exports.SourceFileCache = exports.SassWorkerImplementation = exports.transformSupportedBrowsersToTargets = exports.emitFilesToDisk = exports.serveWithVite = exports.buildApplicationInternal = void 0;
|
|
25
25
|
/**
|
|
26
26
|
* @fileoverview
|
|
27
27
|
* Private exports intended only for use with the @angular-devkit/build-angular package.
|
|
@@ -43,10 +43,12 @@ var sass_service_1 = require("./tools/sass/sass-service");
|
|
|
43
43
|
Object.defineProperty(exports, "SassWorkerImplementation", { enumerable: true, get: function () { return sass_service_1.SassWorkerImplementation; } });
|
|
44
44
|
var source_file_cache_1 = require("./tools/esbuild/angular/source-file-cache");
|
|
45
45
|
Object.defineProperty(exports, "SourceFileCache", { enumerable: true, get: function () { return source_file_cache_1.SourceFileCache; } });
|
|
46
|
-
var jit_resource_transformer_1 = require("./tools/
|
|
46
|
+
var jit_resource_transformer_1 = require("./tools/angular/transformers/jit-resource-transformer");
|
|
47
47
|
Object.defineProperty(exports, "createJitResourceTransformer", { enumerable: true, get: function () { return jit_resource_transformer_1.createJitResourceTransformer; } });
|
|
48
48
|
var javascript_transformer_1 = require("./tools/esbuild/javascript-transformer");
|
|
49
49
|
Object.defineProperty(exports, "JavaScriptTransformer", { enumerable: true, get: function () { return javascript_transformer_1.JavaScriptTransformer; } });
|
|
50
|
+
var compiler_plugin_1 = require("./tools/esbuild/angular/compiler-plugin");
|
|
51
|
+
Object.defineProperty(exports, "createCompilerPlugin", { enumerable: true, get: function () { return compiler_plugin_1.createCompilerPlugin; } });
|
|
50
52
|
// Utilities
|
|
51
53
|
__exportStar(require("./utils/bundle-calculator"), exports);
|
|
52
54
|
var check_port_1 = require("./utils/check-port");
|
|
@@ -31,9 +31,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
exports.AngularCompilation = exports.DiagnosticModes = void 0;
|
|
34
|
-
const load_esm_1 = require("
|
|
35
|
-
const
|
|
36
|
-
const
|
|
34
|
+
const load_esm_1 = require("../../../utils/load-esm");
|
|
35
|
+
const diagnostics_1 = require("../../esbuild/angular/diagnostics");
|
|
36
|
+
const profiling_1 = require("../../esbuild/profiling");
|
|
37
37
|
var DiagnosticModes;
|
|
38
38
|
(function (DiagnosticModes) {
|
|
39
39
|
DiagnosticModes[DiagnosticModes["None"] = 0] = "None";
|
|
@@ -13,11 +13,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
exports.AotCompilation = void 0;
|
|
14
14
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
15
15
|
const typescript_1 = __importDefault(require("typescript"));
|
|
16
|
-
const profiling_1 = require("../../profiling");
|
|
16
|
+
const profiling_1 = require("../../esbuild/profiling");
|
|
17
17
|
const angular_host_1 = require("../angular-host");
|
|
18
|
-
const
|
|
18
|
+
const jit_bootstrap_transformer_1 = require("../transformers/jit-bootstrap-transformer");
|
|
19
|
+
const web_worker_transformer_1 = require("../transformers/web-worker-transformer");
|
|
19
20
|
const angular_compilation_1 = require("./angular-compilation");
|
|
20
|
-
const jit_bootstrap_transformer_1 = require("./jit-bootstrap-transformer");
|
|
21
21
|
class AngularCompilationState {
|
|
22
22
|
angularProgram;
|
|
23
23
|
compilerHost;
|
|
@@ -31,7 +31,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
exports.createAngularCompilation = createAngularCompilation;
|
|
34
|
-
const environment_options_1 = require("
|
|
34
|
+
const environment_options_1 = require("../../../utils/environment-options");
|
|
35
35
|
/**
|
|
36
36
|
* Creates an Angular compilation object that can be used to perform Angular application
|
|
37
37
|
* compilation either for AOT or JIT mode. By default a parallel compilation is created
|
|
@@ -13,10 +13,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
exports.JitCompilation = void 0;
|
|
14
14
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
15
15
|
const typescript_1 = __importDefault(require("typescript"));
|
|
16
|
-
const profiling_1 = require("../../profiling");
|
|
16
|
+
const profiling_1 = require("../../esbuild/profiling");
|
|
17
17
|
const angular_host_1 = require("../angular-host");
|
|
18
|
-
const jit_resource_transformer_1 = require("../jit-resource-transformer");
|
|
19
|
-
const web_worker_transformer_1 = require("../web-worker-transformer");
|
|
18
|
+
const jit_resource_transformer_1 = require("../transformers/jit-resource-transformer");
|
|
19
|
+
const web_worker_transformer_1 = require("../transformers/web-worker-transformer");
|
|
20
20
|
const angular_compilation_1 = require("./angular-compilation");
|
|
21
21
|
class JitCompilationState {
|
|
22
22
|
compilerHost;
|
|
@@ -17,7 +17,7 @@ exports.update = update;
|
|
|
17
17
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
18
18
|
const node_crypto_1 = require("node:crypto");
|
|
19
19
|
const node_worker_threads_1 = require("node:worker_threads");
|
|
20
|
-
const source_file_cache_1 = require("
|
|
20
|
+
const source_file_cache_1 = require("../../esbuild/angular/source-file-cache");
|
|
21
21
|
const aot_compilation_1 = require("./aot-compilation");
|
|
22
22
|
const jit_compilation_1 = require("./jit-compilation");
|
|
23
23
|
let compilation;
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.createJitResourceTransformer = createJitResourceTransformer;
|
|
14
14
|
const typescript_1 = __importDefault(require("typescript"));
|
|
15
|
-
const uri_1 = require("
|
|
15
|
+
const uri_1 = require("../uri");
|
|
16
16
|
/**
|
|
17
17
|
* Creates a TypeScript Transformer to transform Angular Component resource references into
|
|
18
18
|
* static import statements. This transformer is used in Angular's JIT compilation mode to
|
|
@@ -37,10 +37,10 @@ exports.createCompilerPlugin = createCompilerPlugin;
|
|
|
37
37
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
38
38
|
const path = __importStar(require("node:path"));
|
|
39
39
|
const environment_options_1 = require("../../../utils/environment-options");
|
|
40
|
+
const compilation_1 = require("../../angular/compilation");
|
|
40
41
|
const javascript_transformer_1 = require("../javascript-transformer");
|
|
41
42
|
const load_result_cache_1 = require("../load-result-cache");
|
|
42
43
|
const profiling_1 = require("../profiling");
|
|
43
|
-
const compilation_1 = require("./compilation");
|
|
44
44
|
const compilation_state_1 = require("./compilation-state");
|
|
45
45
|
const component_stylesheets_1 = require("./component-stylesheets");
|
|
46
46
|
const file_reference_tracker_1 = require("./file-reference-tracker");
|
|
@@ -57,8 +57,23 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
|
|
|
57
57
|
// Webcontainers currently do not support this persistent cache store.
|
|
58
58
|
let cacheStore;
|
|
59
59
|
if (pluginOptions.sourceFileCache?.persistentCachePath && !process.versions.webcontainer) {
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
try {
|
|
61
|
+
const { LmbdCacheStore } = await Promise.resolve().then(() => __importStar(require('../lmdb-cache-store')));
|
|
62
|
+
cacheStore = new LmbdCacheStore(path.join(pluginOptions.sourceFileCache.persistentCachePath, 'angular-compiler.db'));
|
|
63
|
+
}
|
|
64
|
+
catch (e) {
|
|
65
|
+
setupWarnings.push({
|
|
66
|
+
text: 'Unable to initialize JavaScript cache storage.',
|
|
67
|
+
location: null,
|
|
68
|
+
notes: [
|
|
69
|
+
// Only show first line of lmdb load error which has platform support listed
|
|
70
|
+
{ text: e?.message.split('\n')[0] ?? `${e}` },
|
|
71
|
+
{
|
|
72
|
+
text: 'This will not affect the build output content but may result in slower builds.',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
62
77
|
}
|
|
63
78
|
const javascriptTransformer = new javascript_transformer_1.JavaScriptTransformer({
|
|
64
79
|
sourcemap: !!pluginOptions.sourcemap,
|
|
@@ -10,8 +10,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.setupJitPluginCallbacks = setupJitPluginCallbacks;
|
|
11
11
|
const promises_1 = require("node:fs/promises");
|
|
12
12
|
const node_path_1 = require("node:path");
|
|
13
|
+
const uri_1 = require("../../angular/uri");
|
|
13
14
|
const load_result_cache_1 = require("../load-result-cache");
|
|
14
|
-
const uri_1 = require("./uri");
|
|
15
15
|
/**
|
|
16
16
|
* Loads/extracts the contents from a load callback Angular JIT entry.
|
|
17
17
|
* An Angular JIT entry represents either a file path for a component resource or base64
|
|
@@ -27,9 +27,11 @@ const rxjs_esm_resolution_plugin_1 = require("./rxjs-esm-resolution-plugin");
|
|
|
27
27
|
const sourcemap_ignorelist_plugin_1 = require("./sourcemap-ignorelist-plugin");
|
|
28
28
|
const utils_1 = require("./utils");
|
|
29
29
|
const virtual_module_plugin_1 = require("./virtual-module-plugin");
|
|
30
|
+
const wasm_plugin_1 = require("./wasm-plugin");
|
|
30
31
|
function createBrowserCodeBundleOptions(options, target, sourceFileCache) {
|
|
31
32
|
const { entryPoints, outputNames, polyfills } = options;
|
|
32
33
|
const { pluginOptions, styleOptions } = (0, compiler_plugin_options_1.createCompilerPluginOptions)(options, target, sourceFileCache);
|
|
34
|
+
const zoneless = (0, utils_1.isZonelessApp)(polyfills);
|
|
33
35
|
const buildOptions = {
|
|
34
36
|
...getEsBuildCommonOptions(options),
|
|
35
37
|
platform: 'browser',
|
|
@@ -41,8 +43,9 @@ function createBrowserCodeBundleOptions(options, target, sourceFileCache) {
|
|
|
41
43
|
entryNames: outputNames.bundles,
|
|
42
44
|
entryPoints,
|
|
43
45
|
target,
|
|
44
|
-
supported: (0, utils_1.getFeatureSupport)(target,
|
|
46
|
+
supported: (0, utils_1.getFeatureSupport)(target, zoneless),
|
|
45
47
|
plugins: [
|
|
48
|
+
(0, wasm_plugin_1.createWasmPlugin)({ allowAsync: zoneless, cache: sourceFileCache?.loadResultCache }),
|
|
46
49
|
(0, sourcemap_ignorelist_plugin_1.createSourcemapIgnorelistPlugin)(),
|
|
47
50
|
(0, compiler_plugin_1.createCompilerPlugin)(
|
|
48
51
|
// JS/TS options
|
|
@@ -124,6 +127,7 @@ function createServerCodeBundleOptions(options, target, sourceFileCache) {
|
|
|
124
127
|
if (ssrEntryPoint) {
|
|
125
128
|
entryPoints['server'] = ssrEntryPoint;
|
|
126
129
|
}
|
|
130
|
+
const zoneless = (0, utils_1.isZonelessApp)(polyfills);
|
|
127
131
|
const buildOptions = {
|
|
128
132
|
...getEsBuildCommonOptions(options),
|
|
129
133
|
platform: 'node',
|
|
@@ -140,8 +144,9 @@ function createServerCodeBundleOptions(options, target, sourceFileCache) {
|
|
|
140
144
|
js: `import './polyfills.server.mjs';`,
|
|
141
145
|
},
|
|
142
146
|
entryPoints,
|
|
143
|
-
supported: (0, utils_1.getFeatureSupport)(target,
|
|
147
|
+
supported: (0, utils_1.getFeatureSupport)(target, zoneless),
|
|
144
148
|
plugins: [
|
|
149
|
+
(0, wasm_plugin_1.createWasmPlugin)({ allowAsync: zoneless, cache: sourceFileCache?.loadResultCache }),
|
|
145
150
|
(0, sourcemap_ignorelist_plugin_1.createSourcemapIgnorelistPlugin)(),
|
|
146
151
|
(0, compiler_plugin_1.createCompilerPlugin)(
|
|
147
152
|
// JS/TS options
|