bassdman / vue-feature-toggle Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Seems like dist wasn't updated... should I open a new PR to build the project to dist?
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?
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?
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?
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?
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
Vue give the warning
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.