* Creates an instance of a server platform (with or without JIT compiler support * depending on the `ngJitMode` global const value), using provided options.
(options: PlatformOptions)
| 53 | * depending on the `ngJitMode` global const value), using provided options. |
| 54 | */ |
| 55 | function createServerPlatform(options: PlatformOptions): PlatformRef { |
| 56 | const extraProviders = options.platformProviders ?? []; |
| 57 | const measuringLabel = 'createServerPlatform'; |
| 58 | startMeasuring(measuringLabel); |
| 59 | const {document, url} = options; |
| 60 | |
| 61 | const platform = platformServer([ |
| 62 | { |
| 63 | provide: INITIAL_CONFIG, |
| 64 | useValue: { |
| 65 | document, |
| 66 | url, |
| 67 | }, |
| 68 | }, |
| 69 | extraProviders, |
| 70 | ]); |
| 71 | |
| 72 | stopMeasuring(measuringLabel); |
| 73 | return platform; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Finds and returns inlined event dispatch script if it exists. |
no test coverage detected
searching dependent graphs…