I tried to do import data from 'cldr-data' but webpack explodes.
Then I tried to do something like const caGregorian = require('cldr-data/main/' + name + '/ca-gregorian.json') but it explodes as well.
Is there a way to include all the locales? Is there a better way to handle this?
I really dont know and I would appreciate some help.
Thanks.
Update 1: I get the error when I try to require cldr-dataModule not found: Error: Can't resolve 'fs' in '....\node_modules\cldr-data'
Hi! How can I load all the locales?
I am in a project that expects to adapt to all languages/formats.
And in ll the example I can find, I need to do something like:
Obviously, this is not great.
I tried to do
import data from 'cldr-data'
but webpack explodes. Then I tried to do something likeconst caGregorian = require('cldr-data/main/' + name + '/ca-gregorian.json')
but it explodes as well.Is there a way to include all the locales? Is there a better way to handle this?
I really dont know and I would appreciate some help.
Thanks.
Update 1: I get the error when I try to require
cldr-data
Module not found: Error: Can't resolve 'fs' in '....\node_modules\cldr-data'