Skip to content

Chore: Disable minify option#175

Merged
github-actions[bot] merged 1 commit intomainfrom
vite-option
Apr 5, 2025
Merged

Chore: Disable minify option#175
github-actions[bot] merged 1 commit intomainfrom
vite-option

Conversation

@black7375
Copy link
Contributor

@black7375 black7375 commented Apr 5, 2025

Description

It's a library package, and minifies it to make debugging easier.

Related Issue

Summary by CodeRabbit

  • Chores
    • Updated the production build configuration to disable code minification, which may result in larger bundle sizes and alter performance characteristics.

Additional context

Checklist

@coderabbitai
Copy link

coderabbitai bot commented Apr 5, 2025

Walkthrough

The change updates the production build configuration in the custom Vite config. Specifically, the minify option in the initCommonBuilder function has been changed from "terser" to false, which disables code minification during production builds. No modifications were made to the exported or public entities.

Changes

File(s) Change Summary
configs/vite-config-custom/index.js Updated the build configuration by changing the minify option from "terser" to false, thereby disabling code minification.

Poem

Hoppin’ through code under the moonlit sky,
I’ve nibbled a change that makes minification fly by.
The Terser now sleeps, no more the nightly fest,
An unminified build lets our clear code shine best.
With a joyful skip, this rabbit sings with delight!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

yarn install v1.22.22
[1/4] Resolving packages...
error Couldn't find any versions for "eslint-config-custom" that matches "workspace:^"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2025

Triggered from #175 by @​black7375.

Checking if we can fast forward main (a963dc1) to vite-option (871e38a).

Target branch (main):

commit a963dc1854e0b4278e01c7008ec8187add2eecad (HEAD -> main, tag: @mincho-js/react@0.0.3, tag: @mincho-js/integration@0.0.3, tag: @mincho-js/esbuild@0.0.3, tag: @mincho-js/babel@0.0.3, origin/main)
Author: sangkukbae <sangkukbae@gmail.com>
Date:   Thu Apr 3 02:51:53 2025 +0900

    feat: Co-location using babel

Pull request (vite-option):

commit 871e38ae97311961dfd3adc543279459a70c5f68 (pull_request/vite-option)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Apr 5 23:52:25 2025 +0900

    Chore: Disable minify option

It is possible to fast forward main (a963dc1) to vite-option (871e38a). If you have write access to the target repository, you can add a comment with /fast-forward to fast forward main to vite-option.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
configs/vite-config-custom/index.js (1)

117-127: Consider making minification configurable.

Now that both development and production environments have minification disabled, you might want to consider making this configurable through an environment variable. This would allow you to easily toggle minification on/off without code changes when needed for performance vs. debugging.

 if (ViteEnv.isProd()) {
   configs.add({
     build: {
       sourcemap: false,
-      minify: false
+      minify: process.env.ENABLE_MINIFY === 'true' ? 'terser' : false
     }
   });
 }

Also applies to: 129-136

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a963dc1 and 871e38a.

📒 Files selected for processing (1)
  • configs/vite-config-custom/index.js (1 hunks)
🔇 Additional comments (2)
configs/vite-config-custom/index.js (2)

129-135: Approve change to disable minification in production builds.

This change aligns with the PR objective of improving debuggability by disabling the minification option. With minification turned off, debugging production issues will be more straightforward as the code will maintain its original structure and variable names.

While this will increase bundle size, the tradeoff for improved debugging capability is reasonable, especially if referenced issue #60 involves troubleshooting production problems.


129-135:

Details

❓ Verification inconclusive

Verify impact on bundle size.

While disabling minification improves debuggability, it significantly increases bundle size, which may impact performance. Consider measuring the size difference to understand the trade-off and documenting this decision.


🏁 Script executed:

#!/bin/bash
# Compare bundle sizes with and without minification
# Note: This is a demonstration script that would need to be run separately in production and development environments

echo "Checking current project size structure:"
find dist -type f -name "*.js" -o -name "*.mjs" -o -name "*.cjs" | xargs ls -la | sort -k5 -nr | head -5

Length of output: 563


Ensure accurate bundle size evaluation before merging changes.

  • The output of the verification script indicates that the expected production build directory (dist) was not found. This suggests that either the production build hasn’t been generated yet or the output directory is configured differently.
  • Please confirm that the production build produces the output in the expected directory. If a different directory is used (or if the build hasn’t been run), update the script accordingly and re-measure the bundle sizes.
  • Once the correct bundle files are identified, compare the size differences with minification disabled to assess any performance impact and document the findings.

@black7375
Copy link
Contributor Author

/fast-forward

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2025

Triggered from #175 (comment) by @​black7375.

Trying to fast forward main (a963dc1) to vite-option (871e38a).

Target branch (main):

commit a963dc1854e0b4278e01c7008ec8187add2eecad (HEAD -> main, tag: @mincho-js/react@0.0.3, tag: @mincho-js/integration@0.0.3, tag: @mincho-js/esbuild@0.0.3, tag: @mincho-js/babel@0.0.3, origin/main, origin/HEAD)
Author: sangkukbae <sangkukbae@gmail.com>
Date:   Thu Apr 3 02:51:53 2025 +0900

    feat: Co-location using babel

Pull request (vite-option):

commit 871e38ae97311961dfd3adc543279459a70c5f68 (pull_request/vite-option)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Sat Apr 5 23:52:25 2025 +0900

    Chore: Disable minify option

Fast forwarding main (a963dc1) to vite-option (871e38a).

$ git push origin 871e38ae97311961dfd3adc543279459a70c5f68:main
To https://github.com/mincho-js/mincho.git
   a963dc1..871e38a  871e38ae97311961dfd3adc543279459a70c5f68 -> main

@github-actions github-actions bot merged commit 871e38a into main Apr 5, 2025
7 checks passed
@github-actions github-actions bot deleted the vite-option branch April 5, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant