Using 2.x with locales and webpack
See original GitHub issueIs anyone successfully using the 2.x release with locales and webpack?
The following results in a Cannot read property 'delimiters' of undefined error:
import numeral from "numeral"
numeral.locale("nl-nl")
And when I try this
import numeral from "numeral"
import numeralnl from "numeral/locales/nl-nl"
numeral.register("locale", "nl-nl", numeralnl)
numeral.locale("nl-nl")
It throws the Uncaught TypeError: nl-nl locale already registered error.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
How to create multiple output paths in Webpack config
Webpack does support multiple output paths. Set the output paths as the entry key. And use the name as output template. webpack config:...
Read more >DefinePlugin | webpack
The DefinePlugin replaces variables in your code with other values or expressions at compile time. This can be useful for allowing different behavior ......
Read more >How To Use Custom webpack Configurations with Angular ...
js , moment-locales-webpack-plugin , and @angular-builders/custom-webpack . Step 2 — Building a Localized Clock Display. The example project for ...
Read more >i18n - npm
Minimal example, just setup two locales and a project specific directory. ... Alternatively split creation and configuration, useful when split up ...
Read more >API Reference - Webpack Loader (@lingui/loader) — LinguiJS ...
In case of using po format, use .po . export async function dynamicActivate(locale: string) { const { messages } = await import(`@lingui/loader!
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve managed to make it work like this:
I was having the
Cannot read property 'delimiters' of undefinedissue as well.Running on:
How do we get the locale? I can’t change locale if the locale is already the computer’s locale