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
Add the following to your Webpackconfig file: