@angular/build 18.1.0-next.0 → 18.1.0-next.2

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.
Files changed (256) hide show
  1. package/package.json +23 -14
  2. package/src/builders/application/build-action.d.ts +1 -1
  3. package/src/builders/application/build-action.js +2 -3
  4. package/src/builders/application/execute-build.d.ts +1 -1
  5. package/src/builders/application/execute-build.js +2 -3
  6. package/src/builders/application/execute-post-bundle.d.ts +1 -1
  7. package/src/builders/application/execute-post-bundle.js +2 -3
  8. package/src/builders/application/i18n.d.ts +1 -1
  9. package/src/builders/application/i18n.js +3 -4
  10. package/src/builders/application/index.d.ts +1 -1
  11. package/src/builders/application/index.js +3 -4
  12. package/src/builders/application/options.d.ts +3 -3
  13. package/src/builders/application/options.js +2 -3
  14. package/src/builders/application/setup-bundling.d.ts +1 -1
  15. package/src/builders/application/setup-bundling.js +3 -9
  16. package/src/builders/dev-server/builder.d.ts +1 -2
  17. package/src/builders/dev-server/builder.js +2 -3
  18. package/src/builders/dev-server/index.d.ts +1 -1
  19. package/src/builders/dev-server/index.js +1 -1
  20. package/src/builders/dev-server/internal.d.ts +1 -1
  21. package/src/builders/dev-server/internal.js +1 -1
  22. package/src/builders/dev-server/options.d.ts +5 -1
  23. package/src/builders/dev-server/options.js +27 -3
  24. package/src/builders/dev-server/output.d.ts +1 -1
  25. package/src/builders/dev-server/output.js +1 -1
  26. package/src/builders/dev-server/schema.d.ts +10 -0
  27. package/src/builders/dev-server/schema.json +11 -0
  28. package/src/builders/dev-server/vite-server.d.ts +1 -1
  29. package/src/builders/dev-server/vite-server.js +43 -35
  30. package/src/builders/extract-i18n/application-extraction.d.ts +1 -1
  31. package/src/builders/extract-i18n/application-extraction.js +2 -3
  32. package/src/builders/extract-i18n/builder.d.ts +1 -1
  33. package/src/builders/extract-i18n/builder.js +2 -3
  34. package/src/builders/extract-i18n/index.d.ts +1 -1
  35. package/src/builders/extract-i18n/index.js +1 -1
  36. package/src/builders/extract-i18n/options.d.ts +1 -1
  37. package/src/builders/extract-i18n/options.js +2 -3
  38. package/src/index.d.ts +1 -1
  39. package/src/index.js +1 -1
  40. package/src/private.d.ts +1 -1
  41. package/src/private.js +1 -1
  42. package/src/tools/babel/plugins/adjust-static-class-members.d.ts +1 -2
  43. package/src/tools/babel/plugins/adjust-static-class-members.js +3 -4
  44. package/src/tools/babel/plugins/adjust-typescript-enums.d.ts +1 -2
  45. package/src/tools/babel/plugins/adjust-typescript-enums.js +3 -4
  46. package/src/tools/babel/plugins/elide-angular-metadata.d.ts +1 -2
  47. package/src/tools/babel/plugins/elide-angular-metadata.js +3 -4
  48. package/src/tools/babel/plugins/index.d.ts +1 -1
  49. package/src/tools/babel/plugins/index.js +1 -1
  50. package/src/tools/babel/plugins/pure-toplevel-functions.d.ts +1 -2
  51. package/src/tools/babel/plugins/pure-toplevel-functions.js +2 -2
  52. package/src/tools/babel/typings.d.ts +1 -1
  53. package/src/tools/esbuild/angular/angular-host.d.ts +1 -1
  54. package/src/tools/esbuild/angular/angular-host.js +3 -4
  55. package/src/tools/esbuild/angular/compilation/angular-compilation.d.ts +1 -1
  56. package/src/tools/esbuild/angular/compilation/angular-compilation.js +1 -1
  57. package/src/tools/esbuild/angular/compilation/aot-compilation.d.ts +1 -1
  58. package/src/tools/esbuild/angular/compilation/aot-compilation.js +43 -8
  59. package/src/tools/esbuild/angular/compilation/factory.d.ts +1 -1
  60. package/src/tools/esbuild/angular/compilation/factory.js +2 -3
  61. package/src/tools/esbuild/angular/compilation/index.d.ts +1 -1
  62. package/src/tools/esbuild/angular/compilation/index.js +1 -1
  63. package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.d.ts +1 -1
  64. package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.js +3 -4
  65. package/src/tools/esbuild/angular/compilation/jit-compilation.d.ts +1 -1
  66. package/src/tools/esbuild/angular/compilation/jit-compilation.js +1 -1
  67. package/src/tools/esbuild/angular/compilation/noop-compilation.d.ts +1 -1
  68. package/src/tools/esbuild/angular/compilation/noop-compilation.js +1 -1
  69. package/src/tools/esbuild/angular/compilation/parallel-compilation.d.ts +1 -1
  70. package/src/tools/esbuild/angular/compilation/parallel-compilation.js +1 -1
  71. package/src/tools/esbuild/angular/compilation/parallel-worker.d.ts +3 -2
  72. package/src/tools/esbuild/angular/compilation/parallel-worker.js +11 -8
  73. package/src/tools/esbuild/angular/compilation-state.d.ts +1 -1
  74. package/src/tools/esbuild/angular/compilation-state.js +3 -3
  75. package/src/tools/esbuild/angular/compiler-plugin.d.ts +2 -2
  76. package/src/tools/esbuild/angular/compiler-plugin.js +27 -13
  77. package/src/tools/esbuild/angular/component-stylesheets.d.ts +1 -1
  78. package/src/tools/esbuild/angular/component-stylesheets.js +1 -1
  79. package/src/tools/esbuild/angular/diagnostics.d.ts +1 -1
  80. package/src/tools/esbuild/angular/diagnostics.js +2 -3
  81. package/src/tools/esbuild/angular/file-reference-tracker.d.ts +1 -1
  82. package/src/tools/esbuild/angular/file-reference-tracker.js +1 -1
  83. package/src/tools/esbuild/angular/jit-plugin-callbacks.d.ts +1 -1
  84. package/src/tools/esbuild/angular/jit-plugin-callbacks.js +2 -3
  85. package/src/tools/esbuild/angular/jit-resource-transformer.d.ts +1 -1
  86. package/src/tools/esbuild/angular/jit-resource-transformer.js +2 -3
  87. package/src/tools/esbuild/angular/source-file-cache.d.ts +1 -1
  88. package/src/tools/esbuild/angular/source-file-cache.js +1 -1
  89. package/src/tools/esbuild/angular/uri.d.ts +1 -1
  90. package/src/tools/esbuild/angular/uri.js +5 -5
  91. package/src/tools/esbuild/angular/web-worker-transformer.d.ts +1 -1
  92. package/src/tools/esbuild/angular/web-worker-transformer.js +2 -3
  93. package/src/tools/esbuild/application-code-bundle.d.ts +1 -1
  94. package/src/tools/esbuild/application-code-bundle.js +21 -7
  95. package/src/tools/esbuild/budget-stats.d.ts +1 -1
  96. package/src/tools/esbuild/budget-stats.js +2 -3
  97. package/src/tools/esbuild/bundler-context.d.ts +1 -1
  98. package/src/tools/esbuild/bundler-context.js +1 -1
  99. package/src/tools/esbuild/bundler-execution-result.d.ts +1 -1
  100. package/src/tools/esbuild/bundler-execution-result.js +1 -1
  101. package/src/tools/esbuild/cache.d.ts +1 -1
  102. package/src/tools/esbuild/cache.js +1 -1
  103. package/src/tools/esbuild/commonjs-checker.d.ts +1 -1
  104. package/src/tools/esbuild/commonjs-checker.js +2 -3
  105. package/src/tools/esbuild/compiler-plugin-options.d.ts +1 -1
  106. package/src/tools/esbuild/compiler-plugin-options.js +3 -4
  107. package/src/tools/esbuild/external-packages-plugin.d.ts +1 -1
  108. package/src/tools/esbuild/external-packages-plugin.js +2 -3
  109. package/src/tools/esbuild/global-scripts.d.ts +1 -1
  110. package/src/tools/esbuild/global-scripts.js +2 -3
  111. package/src/tools/esbuild/global-styles.d.ts +1 -1
  112. package/src/tools/esbuild/global-styles.js +3 -4
  113. package/src/tools/esbuild/i18n-inliner-worker.d.ts +2 -2
  114. package/src/tools/esbuild/i18n-inliner-worker.js +2 -2
  115. package/src/tools/esbuild/i18n-inliner.d.ts +1 -1
  116. package/src/tools/esbuild/i18n-inliner.js +1 -1
  117. package/src/tools/esbuild/i18n-locale-plugin.d.ts +1 -1
  118. package/src/tools/esbuild/i18n-locale-plugin.js +3 -3
  119. package/src/tools/esbuild/index-html-generator.d.ts +1 -1
  120. package/src/tools/esbuild/index-html-generator.js +9 -12
  121. package/src/tools/esbuild/javascript-transformer-worker.d.ts +1 -1
  122. package/src/tools/esbuild/javascript-transformer-worker.js +2 -2
  123. package/src/tools/esbuild/javascript-transformer.d.ts +2 -2
  124. package/src/tools/esbuild/javascript-transformer.js +1 -1
  125. package/src/tools/esbuild/license-extractor.d.ts +1 -1
  126. package/src/tools/esbuild/license-extractor.js +2 -3
  127. package/src/tools/esbuild/lmdb-cache-store.d.ts +1 -1
  128. package/src/tools/esbuild/lmdb-cache-store.js +1 -1
  129. package/src/tools/esbuild/load-result-cache.d.ts +1 -1
  130. package/src/tools/esbuild/load-result-cache.js +3 -3
  131. package/src/tools/esbuild/profiling.d.ts +1 -1
  132. package/src/tools/esbuild/profiling.js +5 -6
  133. package/src/tools/esbuild/rxjs-esm-resolution-plugin.d.ts +1 -1
  134. package/src/tools/esbuild/rxjs-esm-resolution-plugin.js +2 -3
  135. package/src/tools/esbuild/sourcemap-ignorelist-plugin.d.ts +1 -1
  136. package/src/tools/esbuild/sourcemap-ignorelist-plugin.js +2 -3
  137. package/src/tools/esbuild/stylesheets/bundle-options.d.ts +1 -1
  138. package/src/tools/esbuild/stylesheets/bundle-options.js +2 -3
  139. package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.d.ts +1 -1
  140. package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.js +2 -3
  141. package/src/tools/esbuild/stylesheets/css-language.d.ts +1 -1
  142. package/src/tools/esbuild/stylesheets/css-language.js +1 -1
  143. package/src/tools/esbuild/stylesheets/css-resource-plugin.d.ts +1 -1
  144. package/src/tools/esbuild/stylesheets/css-resource-plugin.js +2 -3
  145. package/src/tools/esbuild/stylesheets/less-language.d.ts +1 -1
  146. package/src/tools/esbuild/stylesheets/less-language.js +1 -1
  147. package/src/tools/esbuild/stylesheets/sass-language.d.ts +1 -1
  148. package/src/tools/esbuild/stylesheets/sass-language.js +30 -4
  149. package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.d.ts +9 -2
  150. package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.js +46 -41
  151. package/src/tools/esbuild/utils.d.ts +1 -1
  152. package/src/tools/esbuild/utils.js +16 -17
  153. package/src/tools/esbuild/virtual-module-plugin.d.ts +1 -1
  154. package/src/tools/esbuild/virtual-module-plugin.js +2 -3
  155. package/src/tools/esbuild/watcher.d.ts +1 -1
  156. package/src/tools/esbuild/watcher.js +3 -3
  157. package/src/tools/sass/lexer.d.ts +1 -1
  158. package/src/tools/sass/lexer.js +2 -3
  159. package/src/tools/sass/rebasing-importer.d.ts +1 -1
  160. package/src/tools/sass/rebasing-importer.js +3 -3
  161. package/src/tools/sass/sass-service.d.ts +1 -1
  162. package/src/tools/sass/sass-service.js +4 -2
  163. package/src/tools/sass/worker.d.ts +3 -5
  164. package/src/tools/sass/worker.js +2 -2
  165. package/src/tools/vite/angular-memory-plugin.d.ts +1 -1
  166. package/src/tools/vite/angular-memory-plugin.js +2 -3
  167. package/src/tools/vite/i18n-locale-plugin.d.ts +1 -1
  168. package/src/tools/vite/i18n-locale-plugin.js +3 -3
  169. package/src/utils/bundle-calculator.d.ts +1 -1
  170. package/src/utils/bundle-calculator.js +5 -5
  171. package/src/utils/check-port.d.ts +1 -1
  172. package/src/utils/check-port.js +28 -9
  173. package/src/utils/color.d.ts +1 -1
  174. package/src/utils/color.js +1 -1
  175. package/src/utils/delete-output-dir.d.ts +1 -1
  176. package/src/utils/delete-output-dir.js +2 -3
  177. package/src/utils/environment-options.d.ts +1 -1
  178. package/src/utils/environment-options.js +1 -1
  179. package/src/utils/error.d.ts +1 -1
  180. package/src/utils/error.js +2 -3
  181. package/src/utils/format-bytes.d.ts +1 -1
  182. package/src/utils/format-bytes.js +2 -3
  183. package/src/utils/i18n-options.d.ts +1 -1
  184. package/src/utils/i18n-options.js +3 -4
  185. package/src/utils/index-file/add-event-dispatch-contract.d.ts +1 -1
  186. package/src/utils/index-file/add-event-dispatch-contract.js +2 -3
  187. package/src/utils/index-file/augment-index-html.d.ts +1 -1
  188. package/src/utils/index-file/augment-index-html.js +22 -10
  189. package/src/utils/index-file/html-rewriting-stream.d.ts +1 -1
  190. package/src/utils/index-file/html-rewriting-stream.js +2 -3
  191. package/src/utils/index-file/index-html-generator.d.ts +1 -1
  192. package/src/utils/index-file/index-html-generator.js +1 -1
  193. package/src/utils/index-file/inline-critical-css.d.ts +1 -1
  194. package/src/utils/index-file/inline-critical-css.js +1 -1
  195. package/src/utils/index-file/inline-fonts.d.ts +1 -1
  196. package/src/utils/index-file/inline-fonts.js +1 -1
  197. package/src/utils/index-file/nonce.d.ts +1 -1
  198. package/src/utils/index-file/nonce.js +2 -3
  199. package/src/utils/index-file/valid-self-closing-tags.d.ts +1 -1
  200. package/src/utils/index-file/valid-self-closing-tags.js +1 -1
  201. package/src/utils/index.d.ts +1 -1
  202. package/src/utils/index.js +1 -1
  203. package/src/utils/load-esm.d.ts +1 -1
  204. package/src/utils/load-esm.js +2 -3
  205. package/src/utils/load-proxy-config.d.ts +1 -1
  206. package/src/utils/load-proxy-config.js +2 -3
  207. package/src/utils/load-translations.d.ts +1 -1
  208. package/src/utils/load-translations.js +2 -3
  209. package/src/utils/normalize-asset-patterns.d.ts +1 -1
  210. package/src/utils/normalize-asset-patterns.js +3 -3
  211. package/src/utils/normalize-cache.d.ts +1 -1
  212. package/src/utils/normalize-cache.js +3 -4
  213. package/src/utils/normalize-optimization.d.ts +1 -1
  214. package/src/utils/normalize-optimization.js +2 -3
  215. package/src/utils/normalize-source-maps.d.ts +1 -1
  216. package/src/utils/normalize-source-maps.js +2 -3
  217. package/src/utils/postcss-configuration.d.ts +1 -1
  218. package/src/utils/postcss-configuration.js +4 -5
  219. package/src/utils/purge-cache.d.ts +1 -1
  220. package/src/utils/purge-cache.js +2 -3
  221. package/src/utils/resolve-assets.d.ts +1 -1
  222. package/src/utils/resolve-assets.js +2 -3
  223. package/src/utils/routes-extractor/extractor.d.ts +1 -1
  224. package/src/utils/routes-extractor/extractor.js +1 -1
  225. package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.d.ts +1 -1
  226. package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js +4 -5
  227. package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.d.ts +1 -1
  228. package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.js +1 -1
  229. package/src/utils/server-rendering/fetch-patch.d.ts +1 -1
  230. package/src/utils/server-rendering/fetch-patch.js +2 -3
  231. package/src/utils/server-rendering/load-esm-from-memory.d.ts +1 -1
  232. package/src/utils/server-rendering/load-esm-from-memory.js +2 -3
  233. package/src/utils/server-rendering/main-bundle-exports.d.ts +1 -1
  234. package/src/utils/server-rendering/main-bundle-exports.js +1 -1
  235. package/src/utils/server-rendering/prerender.d.ts +1 -1
  236. package/src/utils/server-rendering/prerender.js +2 -3
  237. package/src/utils/server-rendering/render-page.d.ts +1 -1
  238. package/src/utils/server-rendering/render-page.js +2 -3
  239. package/src/utils/server-rendering/render-worker.d.ts +1 -1
  240. package/src/utils/server-rendering/render-worker.js +1 -1
  241. package/src/utils/server-rendering/routes-extractor-worker.d.ts +1 -1
  242. package/src/utils/server-rendering/routes-extractor-worker.js +1 -1
  243. package/src/utils/service-worker.d.ts +1 -3
  244. package/src/utils/service-worker.js +4 -5
  245. package/src/utils/spinner.d.ts +1 -1
  246. package/src/utils/spinner.js +1 -1
  247. package/src/utils/stats-table.d.ts +1 -1
  248. package/src/utils/stats-table.js +3 -4
  249. package/src/utils/supported-browsers.d.ts +1 -1
  250. package/src/utils/supported-browsers.js +2 -3
  251. package/src/utils/tty.d.ts +1 -1
  252. package/src/utils/tty.js +2 -3
  253. package/src/utils/url.d.ts +1 -1
  254. package/src/utils/url.js +2 -3
  255. package/src/utils/version.d.ts +1 -1
  256. package/src/utils/version.js +2 -3
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -133,8 +133,10 @@ class AotCompilation extends angular_compilation_1.AngularCompilation {
133
133
  }
134
134
  emitAffectedFiles() {
135
135
  (0, node_assert_1.default)(this.#state, 'Angular compilation must be initialized prior to emitting files.');
136
- const { angularCompiler, compilerHost, typeScriptProgram, webWorkerTransform } = this.#state;
137
- const buildInfoFilename = typeScriptProgram.getCompilerOptions().tsBuildInfoFile ?? '.tsbuildinfo';
136
+ const { affectedFiles, angularCompiler, compilerHost, typeScriptProgram, webWorkerTransform } = this.#state;
137
+ const compilerOptions = typeScriptProgram.getCompilerOptions();
138
+ const buildInfoFilename = compilerOptions.tsBuildInfoFile ?? '.tsbuildinfo';
139
+ const useTypeScriptTranspilation = !compilerOptions.isolatedModules || !!compilerOptions.sourceMap;
138
140
  const emittedFiles = new Map();
139
141
  const writeFileCallback = (filename, contents, _a, _b, sourceFiles) => {
140
142
  if (!sourceFiles?.length && filename.endsWith(buildInfoFilename)) {
@@ -154,9 +156,20 @@ class AotCompilation extends angular_compilation_1.AngularCompilation {
154
156
  transformers.before ??= [];
155
157
  transformers.before.push((0, jit_bootstrap_transformer_1.replaceBootstrap)(() => typeScriptProgram.getProgram().getTypeChecker()));
156
158
  transformers.before.push(webWorkerTransform);
157
- // TypeScript will loop until there are no more affected files in the program
158
- while (typeScriptProgram.emitNextAffectedFile(writeFileCallback, undefined, undefined, transformers)) {
159
- /* empty */
159
+ // Emit is handled in write file callback when using TypeScript
160
+ if (useTypeScriptTranspilation) {
161
+ // TypeScript will loop until there are no more affected files in the program
162
+ while (typeScriptProgram.emitNextAffectedFile(writeFileCallback, undefined, undefined, transformers)) {
163
+ /* empty */
164
+ }
165
+ }
166
+ else if (compilerOptions.tsBuildInfoFile) {
167
+ // Manually get the builder state for the persistent cache
168
+ // The TypeScript API currently embeds this behavior inside the program emit
169
+ // via emitNextAffectedFile but that also applies all internal transforms.
170
+ const programWithGetState = typeScriptProgram.getProgram();
171
+ (0, node_assert_1.default)(typeof programWithGetState.emitBuildInfo === 'function', 'TypeScript program emitBuildInfo is missing.');
172
+ programWithGetState.emitBuildInfo();
160
173
  }
161
174
  // Angular may have files that must be emitted but TypeScript does not consider affected
162
175
  for (const sourceFile of typeScriptProgram.getSourceFiles()) {
@@ -166,10 +179,32 @@ class AotCompilation extends angular_compilation_1.AngularCompilation {
166
179
  if (sourceFile.isDeclarationFile) {
167
180
  continue;
168
181
  }
169
- if (angularCompiler.incrementalCompilation.safeToSkipEmit(sourceFile)) {
182
+ if (angularCompiler.incrementalCompilation.safeToSkipEmit(sourceFile) &&
183
+ !affectedFiles.has(sourceFile)) {
170
184
  continue;
171
185
  }
172
- typeScriptProgram.emit(sourceFile, writeFileCallback, undefined, undefined, transformers);
186
+ if (useTypeScriptTranspilation) {
187
+ typeScriptProgram.emit(sourceFile, writeFileCallback, undefined, undefined, transformers);
188
+ continue;
189
+ }
190
+ // When not using TypeScript transpilation, directly apply only Angular specific transformations
191
+ const transformResult = typescript_1.default.transform(sourceFile, [
192
+ ...(transformers.before ?? []),
193
+ ...(transformers.after ?? []),
194
+ ], compilerOptions);
195
+ (0, node_assert_1.default)(transformResult.transformed.length === 1, 'TypeScript transforms should not produce multiple outputs for ' + sourceFile.fileName);
196
+ let contents;
197
+ if (sourceFile === transformResult.transformed[0]) {
198
+ // Use original content if no changes were made
199
+ contents = sourceFile.text;
200
+ }
201
+ else {
202
+ // Otherwise, print the transformed source file
203
+ const printer = typescript_1.default.createPrinter(compilerOptions, transformResult);
204
+ contents = printer.printFile(transformResult.transformed[0]);
205
+ }
206
+ angularCompiler.incrementalCompilation.recordSuccessfulEmit(sourceFile);
207
+ emittedFiles.set(sourceFile, { filename: sourceFile.fileName, contents });
173
208
  }
174
209
  return emittedFiles.values();
175
210
  }
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type { AngularCompilation } from './angular-compilation';
9
9
  /**
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
10
  if (k2 === undefined) k2 = k;
@@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
30
30
  return result;
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.createAngularCompilation = void 0;
33
+ exports.createAngularCompilation = createAngularCompilation;
34
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
@@ -53,4 +53,3 @@ async function createAngularCompilation(jit) {
53
53
  return new AotCompilation();
54
54
  }
55
55
  }
56
- exports.createAngularCompilation = createAngularCompilation;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  export { AngularCompilation, DiagnosticModes } from './angular-compilation';
9
9
  export { createAngularCompilation } from './factory';
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.NoopCompilation = exports.createAngularCompilation = exports.DiagnosticModes = exports.AngularCompilation = void 0;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import ts from 'typescript';
9
9
  export declare function replaceBootstrap(getTypeChecker: () => ts.TypeChecker): ts.TransformerFactory<ts.SourceFile>;
@@ -4,13 +4,14 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.elideImports = exports.replaceBootstrap = void 0;
13
+ exports.replaceBootstrap = replaceBootstrap;
14
+ exports.elideImports = elideImports;
14
15
  const typescript_1 = __importDefault(require("typescript"));
15
16
  /**
16
17
  * The name of the Angular platform that should be replaced within
@@ -57,7 +58,6 @@ function replaceBootstrap(getTypeChecker) {
57
58
  };
58
59
  };
59
60
  }
60
- exports.replaceBootstrap = replaceBootstrap;
61
61
  // Remove imports for which all identifiers have been removed.
62
62
  // Needs type checker, and works even if it's not the first transformer.
63
63
  // Works by removing imports for symbols whose identifiers have all been removed.
@@ -179,4 +179,3 @@ function elideImports(sourceFile, removedNodes, getTypeChecker, compilerOptions)
179
179
  }
180
180
  return importNodeRemovals;
181
181
  }
182
- exports.elideImports = elideImports;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type ng from '@angular/compiler-cli';
9
9
  import ts from 'typescript';
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type ng from '@angular/compiler-cli';
9
9
  import type ts from 'typescript';
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.NoopCompilation = void 0;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type { CompilerOptions } from '@angular/compiler-cli';
9
9
  import type { PartialMessage } from 'esbuild';
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -3,9 +3,8 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
- /// <reference types="node" />
9
8
  import type { PartialMessage } from 'esbuild';
10
9
  import { type MessagePort } from 'node:worker_threads';
11
10
  import type { DiagnosticModes } from './angular-compilation';
@@ -23,6 +22,8 @@ export declare function initialize(request: InitRequest): Promise<{
23
22
  referencedFiles: readonly string[];
24
23
  compilerOptions: {
25
24
  allowJs: boolean | undefined;
25
+ isolatedModules: boolean | undefined;
26
+ sourceMap: boolean | undefined;
26
27
  };
27
28
  }>;
28
29
  export declare function diagnose(modes: DiagnosticModes): Promise<{
@@ -4,13 +4,16 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.update = exports.emit = exports.diagnose = exports.initialize = void 0;
13
+ exports.initialize = initialize;
14
+ exports.diagnose = diagnose;
15
+ exports.emit = emit;
16
+ exports.update = update;
14
17
  const node_assert_1 = __importDefault(require("node:assert"));
15
18
  const node_crypto_1 = require("node:crypto");
16
19
  const node_worker_threads_1 = require("node:worker_threads");
@@ -67,24 +70,24 @@ async function initialize(request) {
67
70
  });
68
71
  return {
69
72
  referencedFiles,
70
- // TODO: Expand? `allowJs` is the only field needed currently.
71
- compilerOptions: { allowJs: compilerOptions.allowJs },
73
+ // TODO: Expand? `allowJs`, `isolatedModules`, `sourceMap` are the only fields needed currently.
74
+ compilerOptions: {
75
+ allowJs: compilerOptions.allowJs,
76
+ isolatedModules: compilerOptions.isolatedModules,
77
+ sourceMap: compilerOptions.sourceMap,
78
+ },
72
79
  };
73
80
  }
74
- exports.initialize = initialize;
75
81
  async function diagnose(modes) {
76
82
  (0, node_assert_1.default)(compilation);
77
83
  const diagnostics = await compilation.diagnoseFiles(modes);
78
84
  return diagnostics;
79
85
  }
80
- exports.diagnose = diagnose;
81
86
  async function emit() {
82
87
  (0, node_assert_1.default)(compilation);
83
88
  const files = await compilation.emitAffectedFiles();
84
89
  return [...files];
85
90
  }
86
- exports.emit = emit;
87
91
  function update(files) {
88
92
  sourceFileCache.invalidate(files);
89
93
  }
90
- exports.update = update;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  export declare class SharedTSCompilationState {
9
9
  #private;
@@ -4,10 +4,11 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.getSharedCompilationState = exports.SharedTSCompilationState = void 0;
10
+ exports.SharedTSCompilationState = void 0;
11
+ exports.getSharedCompilationState = getSharedCompilationState;
11
12
  class SharedTSCompilationState {
12
13
  #pendingCompilation = true;
13
14
  #resolveCompilationReady;
@@ -41,4 +42,3 @@ let globalSharedCompilationState;
41
42
  function getSharedCompilationState() {
42
43
  return (globalSharedCompilationState ??= new SharedTSCompilationState());
43
44
  }
44
- exports.getSharedCompilationState = getSharedCompilationState;
@@ -3,14 +3,14 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type { Plugin } from 'esbuild';
9
9
  import { LoadResultCache } from '../load-result-cache';
10
10
  import { BundleStylesheetOptions } from '../stylesheets/bundle-options';
11
11
  import { SourceFileCache } from './source-file-cache';
12
12
  export interface CompilerPluginOptions {
13
- sourcemap: boolean;
13
+ sourcemap: boolean | 'external';
14
14
  tsconfig: string;
15
15
  jit?: boolean;
16
16
  /** Skip TypeScript compilation setup. This is useful to re-use the TypeScript compilation from another plugin. */
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
10
  if (k2 === undefined) k2 = k;
@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
33
33
  return (mod && mod.__esModule) ? mod : { "default": mod };
34
34
  };
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.createCompilerPlugin = void 0;
36
+ 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");
@@ -53,13 +53,19 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
53
53
  async setup(build) {
54
54
  let setupWarnings = [];
55
55
  const preserveSymlinks = build.initialOptions.preserveSymlinks;
56
- // Initialize a worker pool for JavaScript transformations
56
+ // Initialize a worker pool for JavaScript transformations.
57
+ // Webcontainers currently do not support this persistent cache store.
57
58
  let cacheStore;
58
- if (pluginOptions.sourceFileCache?.persistentCachePath) {
59
+ if (pluginOptions.sourceFileCache?.persistentCachePath && !process.versions.webcontainer) {
59
60
  const { LmbdCacheStore } = await Promise.resolve().then(() => __importStar(require('../lmdb-cache-store')));
60
61
  cacheStore = new LmbdCacheStore(path.join(pluginOptions.sourceFileCache.persistentCachePath, 'angular-compiler.db'));
61
62
  }
62
- const javascriptTransformer = new javascript_transformer_1.JavaScriptTransformer(pluginOptions, environment_options_1.maxWorkers, cacheStore?.createCache('jstransformer'));
63
+ const javascriptTransformer = new javascript_transformer_1.JavaScriptTransformer({
64
+ sourcemap: !!pluginOptions.sourcemap,
65
+ thirdPartySourcemaps: pluginOptions.thirdPartySourcemaps,
66
+ advancedOptimizations: pluginOptions.advancedOptimizations,
67
+ jit: pluginOptions.jit,
68
+ }, environment_options_1.maxWorkers, cacheStore?.createCache('jstransformer'));
63
69
  // Setup defines based on the values used by the Angular compiler-cli
64
70
  build.initialOptions.define ??= {};
65
71
  build.initialOptions.define['ngI18nClosureMode'] ??= 'false';
@@ -77,6 +83,8 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
77
83
  let hasCompilationErrors = true;
78
84
  // Determines if TypeScript should process JavaScript files based on tsconfig `allowJs` option
79
85
  let shouldTsIgnoreJs = true;
86
+ // Determines if transpilation should be handle by TypeScript or esbuild
87
+ let useTypeScriptTranspilation = true;
80
88
  // Track incremental component stylesheet builds
81
89
  const stylesheetBundler = new component_stylesheets_1.ComponentStylesheetBundler(styleOptions, pluginOptions.incremental);
82
90
  let sharedTSCompilationState;
@@ -179,6 +187,11 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
179
187
  try {
180
188
  const initializationResult = await compilation.initialize(pluginOptions.tsconfig, hostOptions, createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserveSymlinks));
181
189
  shouldTsIgnoreJs = !initializationResult.compilerOptions.allowJs;
190
+ // Isolated modules option ensures safe non-TypeScript transpilation.
191
+ // Typescript printing support for sourcemaps is not yet integrated.
192
+ useTypeScriptTranspilation =
193
+ !initializationResult.compilerOptions.isolatedModules ||
194
+ !!initializationResult.compilerOptions.sourceMap;
182
195
  referencedFiles = initializationResult.referencedFiles;
183
196
  }
184
197
  catch (error) {
@@ -249,8 +262,9 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
249
262
  });
250
263
  build.onLoad({ filter: /\.[cm]?[jt]sx?$/ }, async (args) => {
251
264
  const request = path.normalize(pluginOptions.fileReplacements?.[path.normalize(args.path)] ?? args.path);
265
+ const isJS = /\.[cm]?js$/.test(request);
252
266
  // Skip TS load attempt if JS TypeScript compilation not enabled and file is JS
253
- if (shouldTsIgnoreJs && /\.[cm]?js$/.test(request)) {
267
+ if (shouldTsIgnoreJs && isJS) {
254
268
  return undefined;
255
269
  }
256
270
  // The filename is currently used as a cache key. Since the cache is memory only,
@@ -266,7 +280,7 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
266
280
  }
267
281
  // No TS result indicates the file is not part of the TypeScript program.
268
282
  // If allowJs is enabled and the file is JS then defer to the next load hook.
269
- if (!shouldTsIgnoreJs && /\.[cm]?js$/.test(request)) {
283
+ if (!shouldTsIgnoreJs && isJS) {
270
284
  return undefined;
271
285
  }
272
286
  // Otherwise return an error
@@ -276,8 +290,9 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
276
290
  ],
277
291
  };
278
292
  }
279
- else if (typeof contents === 'string') {
280
- // A string indicates untransformed output from the TS/NG compiler
293
+ else if (typeof contents === 'string' && (useTypeScriptTranspilation || isJS)) {
294
+ // A string indicates untransformed output from the TS/NG compiler.
295
+ // This step is unneeded when using esbuild transpilation.
281
296
  const sideEffects = await hasSideEffects(request);
282
297
  contents = await javascriptTransformer.transformData(request, contents, true /* skipLinker */, sideEffects);
283
298
  // Store as the returned Uint8Array to allow caching the fully transformed code
@@ -285,7 +300,7 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
285
300
  }
286
301
  return {
287
302
  contents,
288
- loader: 'js',
303
+ loader: useTypeScriptTranspilation || isJS ? 'js' : 'ts',
289
304
  };
290
305
  });
291
306
  build.onLoad({ filter: /\.[cm]?js$/ }, (0, load_result_cache_1.createCachedLoad)(pluginOptions.loadResultCache, async (args) => {
@@ -343,7 +358,6 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
343
358
  },
344
359
  };
345
360
  }
346
- exports.createCompilerPlugin = createCompilerPlugin;
347
361
  function createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserveSymlinks) {
348
362
  return (compilerOptions) => {
349
363
  // target of 9 is ES2022 (using the number avoids an expensive import of typescript just for an enum)
@@ -394,8 +408,8 @@ function createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserve
394
408
  return {
395
409
  ...compilerOptions,
396
410
  noEmitOnError: false,
397
- inlineSources: pluginOptions.sourcemap,
398
- inlineSourceMap: pluginOptions.sourcemap,
411
+ inlineSources: !!pluginOptions.sourcemap,
412
+ inlineSourceMap: !!pluginOptions.sourcemap,
399
413
  mapRoot: undefined,
400
414
  sourceRoot: undefined,
401
415
  preserveSymlinks,
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { OutputFile } from 'esbuild';
9
9
  import { BundleStylesheetOptions } from '../stylesheets/bundle-options';
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type { PartialMessage } from 'esbuild';
9
9
  import type ts from 'typescript';
@@ -4,10 +4,10 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.convertTypeScriptDiagnostic = void 0;
10
+ exports.convertTypeScriptDiagnostic = convertTypeScriptDiagnostic;
11
11
  const node_os_1 = require("node:os");
12
12
  /**
13
13
  * Converts TypeScript Diagnostic related information into an esbuild compatible note object.
@@ -66,4 +66,3 @@ function convertTypeScriptDiagnostic(typescript, diagnostic) {
66
66
  }
67
67
  return message;
68
68
  }
69
- exports.convertTypeScriptDiagnostic = convertTypeScriptDiagnostic;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  export declare class FileReferenceTracker {
9
9
  #private;
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.FileReferenceTracker = void 0;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type { Metafile, OutputFile, PluginBuild } from 'esbuild';
9
9
  import { LoadResultCache } from '../load-result-cache';
@@ -4,10 +4,10 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.setupJitPluginCallbacks = void 0;
10
+ exports.setupJitPluginCallbacks = setupJitPluginCallbacks;
11
11
  const promises_1 = require("node:fs/promises");
12
12
  const node_path_1 = require("node:path");
13
13
  const load_result_cache_1 = require("../load-result-cache");
@@ -114,4 +114,3 @@ function setupJitPluginCallbacks(build, stylesheetBundler, additionalResultFiles
114
114
  };
115
115
  }));
116
116
  }
117
- exports.setupJitPluginCallbacks = setupJitPluginCallbacks;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import ts from 'typescript';
9
9
  /**
@@ -4,13 +4,13 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.createJitResourceTransformer = void 0;
13
+ exports.createJitResourceTransformer = createJitResourceTransformer;
14
14
  const typescript_1 = __importDefault(require("typescript"));
15
15
  const uri_1 = require("./uri");
16
16
  /**
@@ -50,7 +50,6 @@ function createJitResourceTransformer(getTypeChecker) {
50
50
  };
51
51
  };
52
52
  }
53
- exports.createJitResourceTransformer = createJitResourceTransformer;
54
53
  function visitDecorator(nodeFactory, node, typeChecker, resourceImportDeclarations) {
55
54
  const origin = getDecoratorOrigin(node, typeChecker);
56
55
  if (!origin || origin.module !== '@angular/core' || origin.name !== 'Component') {
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type ts from 'typescript';
9
9
  import { MemoryLoadResultCache } from '../load-result-cache';
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
10
  if (k2 === undefined) k2 = k;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  /**
9
9
  * A string value representing the namespace for Angular JIT mode related imports for