feat(components): auto dev mode via environment#8085
Closed
feat(components): auto dev mode via environment#8085
Conversation
Contributor
Hydration Benchmark Report (vs Baseline)✅ Top 5 Improvements (Best Speedups)
🔻 Flop 5 Regressions (Worst Slowdowns)
📋 Show all results
|
Contributor
|
Netlify Draft Deployment |
…r-entwicklungsmodus
…modus' into 8gmzx2-feature/implementiere-prop-validatoren-fur-entwicklungsmodus Signed-off-by: Martin <6279703+deleonio@users.noreply.github.com>
…r-entwicklungsmodus
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request focuses on simplifying the handling of development mode (
DEV_MODE) by removing thesetDevModefunction and replacing its usage with a direct check of theprocessEnvvariable. Additionally, it refactors related code to streamline initialization and validation processes.Refactoring Development Mode Handling:
packages/components/src/core/bootstrap.ts: Removed theenvironmentproperty from theKoliBriOptionstype and eliminated the call tosetDevModein thebootstrapfunction. Development mode is now inferred directly fromprocessEnv. [1] [2]packages/components/src/schema/utils/dev.utils.ts: Removed thesetDevModefunction and replaced theDEV_MODEinitialization with a direct check againstprocessEnv.packages/components/src/utils/dev.utils.ts: Removed the call tosetDevModein theinitMetafunction, as development mode is now handled globally. [1] [2]Validation Logic Updates:
packages/components/src/schema/utils/prop.validators.ts: Updated thewatchValidatorfunction to skip validation logic entirely ifDEV_MODEis false, improving performance in production environments.Cleanup and Simplification:
packages/samples/react/src/react.main.tsx: Removed theenvironmentproperty from thebootstrapcall, as it is no longer required.