BazingaJsTranslationBundle
BazingaJsTranslationBundle copied to clipboard
Uncaught ReferenceError: Translator is not defined
Hello,
I'm using Symfony 5.1, webpack Encore 1.8 and bazinga-translator 4.0.1. I have this error :
Uncaught ReferenceError: Translator is not defined
Howerver, I import the module in the app.js like this :
import Translator from 'bazinga-translator';
window['Translator'] = Translator;
I don't understand this mistake.
Hello,
I had the same issue, but I soved it via :
const Translator = require('bazinga-translator');
global.Translator = window.Translator = Translator;