Git Product home page Git Product logo

Comments (5)

euvl avatar euvl commented on May 21, 2024 1

Sooo what stops you from including just a component again? Seems to pretty much work for everyone else 🤔

Try vue-js-toggle-button/src/Button

from vue-js-toggle-button.

aldencolerain avatar aldencolerain commented on May 21, 2024 1

@euvl Thanks for the great component. Probably this is more just a documentation issue. Most Vue component packages export a component by default not a plugin although the plugin is very nice. I think this could be solved by just adding a second short paragraph or sentence showing how to import it as a component since that is what many are used to. It wasn't hard but I did need to look in the source to find the path because it wasn't documented.

from vue-js-toggle-button.

burlesona avatar burlesona commented on May 21, 2024

If I ref the raw component from src it fails to build with cannot parse <template>. I'm not sure exactly what's different about my build setup as I use .vue files for SFC like anyone else, but I'm working on an older app that uses gulp + browserify rather than web pack, and I assume there's some config difference that causes the problem.

In any case I've had no trouble importing various vue components (like vuedraggable) etc. when they export a component and I can just import that, but the plugin thing just doesn't take.

I worked around it by just copying the source into my local assets and importing the component from there, but that's not as nice as being able to use the NPM package.

But, my build issues aside, I would guess that many people would rather import the component and declare it in their own components rather than have a global component declared via plugin install. /shrug Maybe just me though.

from vue-js-toggle-button.

aldencolerain avatar aldencolerain commented on May 21, 2024

Made a pull request #66 to document importing component directly.

from vue-js-toggle-button.

euvl avatar euvl commented on May 21, 2024

Hey @aldencolerain , thanks a lot for your PR. Merged 👍

from vue-js-toggle-button.

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.