Im trying to create a angular 4 project with L10n support .I'm trying to use Globalize library in my project .But im getting a lot of error when compling my project.I dont want to use globalize-webpack-plugin or to change my webpack config file .I installed globalize usingnpm install globalize cldr-data.But when im trying to use globalize in my .ts file like import Globalize from 'globalize' im getting error like cant resolve cldr.
import { Component,OnInit} from '@angular/core';
import * as cldr from 'cldrjs';
import Globalize from 'globalize';
var globalize = new Globalize( "en" );
console.log(globalize);
ERROR in ./~/globalize/dist/globalize.js
Module not found: Error: Can't resolve 'cldr'
Im stuck at this point .Any help is appreciated
You need to add paths to the
globalizeandcldrmodules in yourtsconfig.jsonfile like this:Reference: https://github.com/DevExpress/devextreme-angular/blob/master/docs/setup-3rd-party-dependencies.md#globalize-registration