fix(frontend): resolve electron installation and vite preload build issues (#2206)#2208
Open
sundaram2021 wants to merge 1 commit into
Open
Conversation
Author
|
it is important to commit the lock files since it has updated the deps there and incompatible versions are the main reason the development server failing to run on windows. |
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.
Overview
This PR addresses Electron installation and Vite preload build configuration issues (resolves #2206).
It ensures that the project installation completes without build failures from unnecessary postinstall scripts, and modifies the Vite preload configuration to prevent issues relating to code splitting in Electron preload scripts.
Changes
Build & Workspace Configuration
core-js: falseunderallowBuildsto disable unnecessary build scripts during package installation, improving stability and avoiding install failures.treeshake: false) since it can interfere with Electron-specific APIs in preload environments.inlineDynamicImports: trueandmanualChunks: undefinedto force single-chunk outputs, preventing code splitting in preload scripts (which Electron does not natively support).Routing Setup
Verification Plan
Automated Checks
Run the following scripts from the root directory to verify types and build stability:
Manual Verification
pnpm installin thefrontenddirectory to ensure workspace configuration respects build allowances and installs without errors.pnpm run devand verify that the Electron window boots up successfully with all routes rendering properly.