Fix[core] compiler option not recognized in monorepo problem#3004#3005
Closed
SisyphusZheng wants to merge 4 commits intodenoland:mainfrom
Closed
Fix[core] compiler option not recognized in monorepo problem#3004#3005SisyphusZheng wants to merge 4 commits intodenoland:mainfrom
SisyphusZheng wants to merge 4 commits intodenoland:mainfrom
Conversation
Comment on lines
+268
to
+290
| // Merge configurations: app-level takes precedence over workspace-level | ||
| // This ensures Fresh apps can override JSX settings while still inheriting other configs | ||
| const mergedConfig: DenoConfig = {}; | ||
| const rootConfig = configs[configs.length - 1]; // workspace root config | ||
| const appConfig = configs[0]; // application config | ||
|
|
||
| // Start with workspace root config as base | ||
| if (rootConfig.config.compilerOptions) { | ||
| mergedConfig.compilerOptions = { ...rootConfig.config.compilerOptions }; | ||
| } | ||
|
|
||
| // Override with application-specific config, giving priority to JSX settings | ||
| if (appConfig.config.compilerOptions) { | ||
| mergedConfig.compilerOptions = { | ||
| ...mergedConfig.compilerOptions, | ||
| ...appConfig.config.compilerOptions, | ||
| }; | ||
| } | ||
|
|
||
| // Always preserve workspace setting from the appropriate config | ||
| if (appConfig.config.workspace !== undefined) { | ||
| mergedConfig.workspace = appConfig.config.workspace; | ||
| } else if (rootConfig.config.workspace !== undefined) { |
Collaborator
There was a problem hiding this comment.
This seems overly complicated. We have an array of config objects and we know that the first one is the app config (aka workspace member). So you can iterate over that array and check for every items if the necessary JSX compiler options are set. When you encounter such an config item, or when the config item as workspace set, abort.
Contributor
Author
There was a problem hiding this comment.
Cool thx, i will fix it in next week
Collaborator
|
Thanks for working on this. We needed this fix right now and went ahead by merging #3096 instead. |
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.
Resolves issue where jsxImportSource from subproject's deno.json was not recognized, as Fresh was incorrectly using the root workspace config.
Closes: #3004