Coder Social home page Coder Social logo

vue-feature-toggle's People

Contributors

bassdman avatar yspreen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vue-feature-toggle's Issues

Webpack warning: "export 'h' (imported as 'vue') was not found in 'vue on VueJS 2

Summary

Thanks for the library update it's great. Similar to this issue in another package we get this alert when using vuejs2 with this package, which gets picked up by webpack. (on version 2.0.4)

"export 'h' (imported as 'vue') was not found in 'vue'

This doesn't affect functionality but is being logged by our webpack bundler as a warning, would it be possible to fix?

Vue3 compatibility

The repo indicates it is compatible with Vue 3, but when doing npm i vue-feature-toggle a build error throws:

npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR!   vue@"^3.2.11" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.x" from [email protected]
npm ERR! node_modules/vue-feature-toggle
npm ERR!   vue-feature-toggle@"*" from the root project

How do we build this with Vue 3 without including Vue 2 code base and resolving errors?

Missing TypeScript support

The package does not provide types. I tested it in my Vue3 project. Also npm i --save-dev @types/vue-feature-toggle did not help. Can you provide types?

feature.isVisible in vue router?

I would like to use the feature.isVisible functionality inside a router guard, but so far I wasn't successful.
Currently I have a guard written, which is called beforeEach route:

export const featureGuard: NavigationGuard = async (to, from, next) => {
 if (to?.meta?.feature) {
   if (feature.isVisible(to.meta.feature)) {
     next();
     return;
   }
   next(from.fullPath);
 }
 next();
};

and in the router config I added a meta field, where we need a feature flag.

{
      path: '/feature',
      component: () => import('@/views/Feature.vue'),
      meta: {
        feature: 'featureName',
      },
},

Does the feature api require the vue context? Any hint's what would be the best practice here to implement conditions via routing?

License circumstances should be hinted

Hi,
thank you for coding this library, i found it on npm and checked out the github repo. Than i saw that it is released under the GPLv3 which could cause trouble for your users like described here:

https://stackoverflow.com/a/1239727/6355502

The most easy solution would be to change the license to a permissive one. But to do or not, this is only your right to decide as author.
But as the installation process of the library is fortunately documented very well, the license context is not. IMAO the restrictions like "All code linked with GPL 3.0 source code must be disclosed under a GPL 3.0 compatible license." should be listed close to the npm install command.

kind regards

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.