-
Notifications
You must be signed in to change notification settings - Fork 722
feat(build): integrate esbuild for improved build performance and add CSS processing #1777
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
Conversation
… CSS processing Signed-off-by: 7HR4IZ3 <[email protected]>
Summary of ChangesHello @7HR4IZ3, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the project's build infrastructure by transitioning from Webpack to esbuild. This change is primarily driven by the goal of achieving faster build times and improving the overall efficiency of the development process. The new setup also incorporates robust CSS preprocessing capabilities using SASS and PostCSS, ensuring modern styling practices are maintained. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request replaces Webpack with esbuild for the build process, which should significantly improve build times. It also introduces CSS processing with Sass and PostCSS. The changes include a new esbuild script, updates to npm packages, and modifications to shell scripts to use the new build process. The code is well-structured, but I have a few suggestions to improve maintainability and the development experience, particularly around sourcemap generation and how Web Workers are handled.
| */ | ||
| function getWorker() { | ||
| return new Worker(new URL("./worker.js", import.meta.url)); | ||
| return new Worker("./build/searchInFilesWorker.js"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a hardcoded path to the built worker file makes the code more brittle. If the build output structure changes, this path will need to be updated. It's better to use the new URL('./worker.js', import.meta.url) syntax. esbuild supports this and will automatically bundle the worker and generate the correct path. This also allows you to remove the worker as a separate entry point in your esbuild.js configuration, simplifying it.
| return new Worker("./build/searchInFilesWorker.js"); | |
| return new Worker(new URL("./worker.js", import.meta.url)); |
Signed-off-by: 7HR4IZ3 <[email protected]>
|
Assigned myself to update F-droid Build commands If this gets Merged. |
|
@7HR4IZ3 Thank you for your contribution! However, I personally don’t feel confident using esbuild for production. It’s great for development, but even Vite relies on esbuild only during dev and switches to rollup(now rolldown) for production builds. So depending solely on esbuild for production doesn’t seem like the best direction to me. |
|
Oh, alright I'll try modifying it for rspack/rollup (wasn't able to get bite working properly) and create another PR |
No description provided.