Enable minification for build artifact #60

Closed
Philipp wants to merge 0 commits from build/minify into main
Owner

PR Type

Enhancement


Description

  • Enable minification in build script.

  • Produce minified dist/index.js bundle.


File Walkthrough

Relevant files
Configuration changes
package.json
Add minification flag to build script                                       

package.json

  • Added -m flag to build script.
+1/-1     
Build artifact
index.js
Provide minified distribution bundle                                         

dist/index.js

  • Updated output to minified bundle.
+5/-51912

### **PR Type** Enhancement ___ ### **Description** - Enable minification in build script. - Produce minified `dist/index.js` bundle. ___ <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>package.json</strong><dd><code>Add minification flag to build script</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> package.json - Added `-m` flag to build script. </details> </td> <td><a href="https://git.horstenkamp.eu/Screeps/screeps-deploy-action/src/branch/build/minify/package.json">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Build artifact</strong></td><td><table> <tr> <td> <details> <summary><strong>index.js</strong><dd><code>Provide minified distribution bundle</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> dist/index.js - Updated output to minified bundle. </details> </td> <td><a href="https://git.horstenkamp.eu/Screeps/screeps-deploy-action/src/branch/build/minify/dist/index.js">+5/-51912</a></td> </tr> </table></td></tr></tr></tbody></table> </details> ___
Philipp added the enhancement label 2026-01-04 07:09:29 +01:00
Philipp self-assigned this 2026-01-04 07:09:29 +01:00
Philipp added 1 commit 2026-01-04 07:09:31 +01:00
build: enable minification for build artifact
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m40s
Test / Run Tests (push) Successful in 6m29s
d9a56ea576
AutoReview changed title from build: enable minification for build artifact to Enable minification for build artifact 2026-01-04 07:10:09 +01:00
Member

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵
🧪 No relevant tests
🔒 No security concerns identified
 Recommended focus areas for review

Minification impact

Ensure the -m flag for minification with ncc produces a functioning bundle without altering behavior or introducing runtime errors.

"build": "ncc build index.js -o dist -m --external utf-8-validate --external bufferutil"
External dependencies

Verify that utf-8-validate and bufferutil remain correctly excluded from the minified output and are still resolved at runtime.

"build": "ncc build index.js -o dist -m --external utf-8-validate --external bufferutil"
## PR Reviewer Guide 🔍 Here are some key observations to aid the review process: <table> <tr><td>⏱️&nbsp;<strong>Estimated effort to review</strong>: 1 🔵⚪⚪⚪⚪</td></tr> <tr><td>🧪&nbsp;<strong>No relevant tests</strong></td></tr> <tr><td>🔒&nbsp;<strong>No security concerns identified</strong></td></tr> <tr><td>⚡&nbsp;<strong>Recommended focus areas for review</strong><br><br> <details><summary><a href='https://git.horstenkamp.eu/Screeps/screeps-deploy-action/src/branch/build/minify/package.json#L9-L9'><strong>Minification impact</strong></a> Ensure the `-m` flag for minification with ncc produces a functioning bundle without altering behavior or introducing runtime errors. </summary> ```json "build": "ncc build index.js -o dist -m --external utf-8-validate --external bufferutil" ``` </details> <details><summary><a href='https://git.horstenkamp.eu/Screeps/screeps-deploy-action/src/branch/build/minify/package.json#L9-L9'><strong>External dependencies</strong></a> Verify that `utf-8-validate` and `bufferutil` remain correctly excluded from the minified output and are still resolved at runtime. </summary> ```json "build": "ncc build index.js -o dist -m --external utf-8-validate --external bufferutil" ``` </details> </td></tr> </table>
Member

PR Code Suggestions

No code suggestions found for the PR.

## PR Code Suggestions ✨ No code suggestions found for the PR.
Philipp force-pushed build/minify from d9a56ea576 to 653441e50b 2026-01-04 07:14:44 +01:00 Compare
Philipp force-pushed build/minify from 653441e50b to c05341c0a7 2026-01-04 07:19:44 +01:00 Compare
Philipp closed this pull request 2026-01-04 07:23:38 +01:00
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m29s
Required
Details
Test / Run Tests (push) Successful in 6m9s
Required
Details

Pull request closed

Sign in to join this conversation.