Giter Site home page Giter Site logo

Comments (16)

iCrawl avatar iCrawl commented on July 19, 2024 2

I didn't encounter that issue, but there seems generally either be a wrong version used.
The package.json says v5 but either the readme is wrong or the dist/ is wrong since in v4 it was stated that:

  • Renamed main component from <plyr> to <vue-plyr>.

But doing <vue-plyr> just results in Vue telling me that vue-plyr is indeed not a thing. Changing it to <plyr> works indeed.

from vue-plyr.

redxtech avatar redxtech commented on July 19, 2024 1

I'll take a look as soon as I get home.

from vue-plyr.

qarthandgi avatar qarthandgi commented on July 19, 2024

Been gettin Unknown custom element errors in Vue.
I renamed <vue-plyr> to <plyr> and the error suddenly went away.

from vue-plyr.

irazasyed avatar irazasyed commented on July 19, 2024

@redxtech Any updates?

from vue-plyr.

irazasyed avatar irazasyed commented on July 19, 2024

@iCrawl @qarthandgi Apparently it's compiling old version which is why we don't see vue-plyr and instead plyr which is only present in previous versions of the project.

from vue-plyr.

redxtech avatar redxtech commented on July 19, 2024

Hey sorry guys I'll take a look at this later today. I've had some personal stuff going on the past week or so and haven't been able to spend any time on this component.

from vue-plyr.

redxtech avatar redxtech commented on July 19, 2024

Ok I checked it out and published a new version (5.0.2) which should fix this error. Let me know if it doesn't work for you.

@irazasyed @iCrawl @qarthandgi

from vue-plyr.

akarelas avatar akarelas commented on July 19, 2024

@redxtech I can't make it work. You can check out my absolutely minimal nuxt project (which I published for you) here: https://github.com/akarelas/test-vue-plyr

Has just two commits - first is how next scaffolded it, and the second is how I modified it for vue-plyr.

Installation and running instructions are on the project repo's homepage.

You can test it if you like.

from vue-plyr.

irazasyed avatar irazasyed commented on July 19, 2024

@redxtech Thanks for looking into this issue. The new patch has everything except the export of VuePlyr and it still is missing when I try to import it.

Ex:

import { VuePlyr } from 'vue-plyr'

I want to add this as a component inside a component. While the source file does export VuePlyr, for some reason it's missing in the compiled version.

from vue-plyr.

redxtech avatar redxtech commented on July 19, 2024

Does the source file export it? I thought I removed that to bypass the named exports thing where the default export needed to be VuePlyr['default']. Now you can just import VuePlyr from 'vue-plyr' and then Vue.use(VuePlyr)

from vue-plyr.

irazasyed avatar irazasyed commented on July 19, 2024

@redxtech It was exporting earlier and I downloaded this repo and manually importing the index file into my project and it works good (With that export we had earlier).

I don't want to include it as a global component which is why I'm importing into just one component I have in my project as its usage is limited to one section of the project. Please consider adding it back.

from vue-plyr.

redxtech avatar redxtech commented on July 19, 2024

@akarelas that is an entirely different error altogether. That is currently open at #32 & sampotts/plyr#1220. Needs to be fixed upstream.

from vue-plyr.

redxtech avatar redxtech commented on July 19, 2024

@irazasyed I'll look into a nice way to have both default and named exports. Just a question though, is there any performance improvement to having the component installed locally or is is just preference to not globally install it? Also the reason that cloning the repo was probably because you were using the master branch which I hadn't merged the patch into yet.

from vue-plyr.

redxtech avatar redxtech commented on July 19, 2024

@irazasyed I added the named imports back and changed the install options to use the umd build so it wouldn't cause an error when importing via the <script> tag. I'll close this some time tomorrow unless someone still has an issue by then.

from vue-plyr.

irazasyed avatar irazasyed commented on July 19, 2024

@redxtech I can confirm it's working good now. Thank you.

As for your question, it is for performance and preference both reasons. This would allow me to lazy load the entire component which relies on vue-plyr when required instead of loading all globally which the component has no use anywhere else. Further, there would be no conflicts with component names in case any other components share the same name now or in future of my own or third-party package. Just keeps components organized and isolated.

from vue-plyr.

redxtech avatar redxtech commented on July 19, 2024

@irazasyed yeah ok that makes complete sense - I completely forgot about lazy loading in this case. Glad it worked out.

from vue-plyr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.