87968: Fix JSON5 parsing in Universal loader

Failed ~
  Error: export 'parse' (imported as 'JSON5') was not found in 'json5' (possible exports: default)

Only affected SSR: once CSR kicked in translations were loaded properly
This commit is contained in:
Yura Bondarenko
2022-03-11 16:38:19 +01:00
parent 49f470c07b
commit 8f7389c83a

View File

@@ -1,8 +1,9 @@
import { TranslateLoader } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import * as JSON5 from 'json5'
import * as fs from 'fs';
const JSON5 = require('json5').default;
export class TranslateJson5UniversalLoader implements TranslateLoader {
constructor(private prefix: string = 'dist/assets/i18n/', private suffix: string = '.json') { }