mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
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:
@@ -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') { }
|
||||
|
Reference in New Issue
Block a user