localized-strings
localized-strings copied to clipboard
NodeJS
Is it possible to use with NodeJS? So far when I try, I get the error : const key = new LocalizedStrings({ ^
TypeError: LocalizedStrings is not a constructor
I guess you should use a transpiler like Babel.
Hello, Thanks for your reply. I'm not an expert in transpiler, could you please guide me in the process of making it work with Babel ?
@LivioGama are you using require() ??? try with .default
const LocalizedStrings = require('localized-strings').default;
Hi, this issue still remains when using ES6 any updates guys?
import LocalizedStrings from 'localized-strings';
let strings = new LocalizedStrings(
{ ^
TypeError: LocalizedStrings is not a constructor
This seems to work for ES6 -
const strings = new LocalizedStrings.default( { .....