Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw error on build when invalid features are declared via env var #609

Open
elboletaire opened this issue Mar 21, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@elboletaire
Copy link
Member

elboletaire commented Mar 21, 2024

This is already being done for login types, although it's a bit precarious, since we're re-declaring a key that is already declared somewhere else.

All this has to be done in vite/features.ts and, since it's outside of the src directory, this can cause import issues for some parts.. so maybe the keys of the things to be declared should be outside, and then re-used both in features and in the code.

If this cannot be done, at least re-declare whatever is necessary in order to get a sort of features validation when building (and when running the dev server too, ofc).

Example of the current implementations for logins can be found here: https://github.com/vocdoni/ui-scaffold/blob/develop/vite/features.ts#L27-L32

@elboletaire elboletaire added the enhancement New feature or request label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant