Answer the question
In order to leave comments, you need to log in
How to use plugins without build system in vue.js?
I just started to understand vue.js and I'm trying to include a plugin in my application, for example, this one: https://www.npmjs.com/package/facebook-login-vuejs
The description says:
import FBSignInButton from 'vue-facebook-signin-button'
Vue.use(FBSignInButton)
<script>
? <script src="/js/vue-facebook-signin-button.min.js"></script>
and Vue.use(FBSignInButton)
but it doesn't work. I didn't find anything in the manual. Answer the question
In order to leave comments, you need to log in
We connected the plugin from the root, the first. Second, it will not work without a build system, since import/export has not yet been implemented normally without a build system. You can take the source, get the layout from the component, transfer it to html, instead of importing and exporting, manually transfer all instance fields to your js file, check all the dependencies of this component, remember the subtleties associated with the data fields of the component and the root instance. In short, rewrite this whole thing from the source for yourself, so that you can connect everything with a file. Or install a build system, bundle everything and connect the final file to the project.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question