Skip to content

Conversation

@reynaldichernando
Copy link
Collaborator

@reynaldichernando reynaldichernando commented Oct 27, 2025

Fixes #9

  • added esbuild for bundling
  • split event handlers (js files) based on features

@reynaldichernando reynaldichernando marked this pull request as ready for review October 28, 2025 08:04
@reynaldichernando
Copy link
Collaborator Author

reynaldichernando commented Oct 28, 2025

some notes

  • we still have app.js right now because it has both logic for sidebar and router, currently its tightly coupled, so we might need to revisit this, will fix this with the router.js change
  • we still manually add the jquery and highlight js via copy file, we have 2 options (open for discussion)
    • bundle them together into single JS (this we can just remove the copied file, and import from node modules, esbuild is pretty smart enough to include it in bundle)
    • do not bundle them, and just use cdn, like unpkg or jsdelivery
  • once we do the jquery and highlight js, we no longer need to copy the entire assets/js since its bundled anyway, so we could remove the copy code

@reynaldichernando
Copy link
Collaborator Author

other than above comment, this change is net positive for both devex (separate files/concerns) and performance (15kb total bundle size, down from 24KB app.js)

@reynaldichernando reynaldichernando merged commit 14023c4 into main Oct 29, 2025
@reynaldichernando reynaldichernando deleted the app-js branch October 30, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor app.js

2 participants