question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can the localized version be used inside a Vue2 component ?

See original GitHub issue

How can the localized version be used inside a Vue2 component ? I tryed the comands below (one at a time), but none of them worked.

</template>
<script>
import firebaseui from "https://www.gstatic.com/firebasejs/ui/2.5.1/firebase-ui-auth__pt.js";
import firebaseui from "./assets/firebase-ui-auth__pt.js";
require ("./assets/firebase-ui-auth__pt.js");
var firebaseui = require ("./assets/firebase-ui-auth__pt.js");

export default {
// ...

The console has shown the message “ReferenceError: firebaseui is not defined” in the command “new firebaseui.auth.AuthUI(firebase.auth())”.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bojeil-googlecommented, Jan 26, 2018

You can first npm install firebaseui --save to bring in all missing dependencies.

2reactions
bojeil-googlecommented, Jan 25, 2018

Clone the repo. Build the translated library: npm run build build-npm-pt this will generate dist/npm__pt.js

Copy it to your Vue project src folder

Add npm__pt.js to .babelrc ignore list:

"ignore": [
  "src/npm__pt.js"
]

Import it in your Vue component: import firebaseui from '../npm__fr'

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue 2 Localization with Vue I18n: A Step-by-Step Guide | Phrase
Get an insight into Vue 2 localization and learn how to plug the Vue I18n library into your app to make it ready...
Read more >
Managing Local State In Vue.js Components | by Nick Basile
In our data , we have a state property that we're using to keep track of the different states of our component. Pretty...
Read more >
Localization in Vue.js with vue-i18n - LogRocket Blog
In this tutorial, we'll show you how to use Vue I18n to implement localization, internationalization, and translation in your Vue.js app.
Read more >
Components Basics - Vue.js
The template is inlined as a JavaScript string here, which Vue will compile on the fly. You can also use an ID selector...
Read more >
Component interpolation | Vue I18n
Support Version. 7.0+. Sometimes, we need to localize with a locale message that was included in a HTML tag or component. For example:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found