Skip to content
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

move to webpack for cache busting and other benefits #497

Merged
merged 1 commit into from Nov 27, 2023

Conversation

fcaps
Copy link
Collaborator

@fcaps fcaps commented Nov 26, 2023

closes #496

this is the first step to move to webpack.

  • moved all "public/js" files into a new directoy "src/frontend", so we can run webpack and grunt without issues
  • added a new static-asset entry for "dist" in express
  • removed all related grunt tasks for js files.
  • removed empty "account.js"
  • moved octokit to node_modules

known issues:

  • development is running a "prod" configuration for webpack, not optimal, but it works for now
  • webpackManifestJS could be lazy-loaded, or hot-reloaded when on development

Copy link

codecov bot commented Nov 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (develop@ef213c4). Click here to learn what that means.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #497   +/-   ##
==========================================
  Coverage           ?   41.93%           
==========================================
  Files              ?       47           
  Lines              ?     1116           
  Branches           ?      128           
==========================================
  Hits               ?      468           
  Misses             ?      634           
  Partials           ?       14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fcaps fcaps mentioned this pull request Nov 26, 2023
Copy link
Member

@Sheikah45 Sheikah45 left a comment

Choose a reason for hiding this comment

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

Although I am curious why webpack and not vite.

Purely from an academic standpoint.

@fcaps
Copy link
Collaborator Author

fcaps commented Nov 27, 2023

webpack is well known, but thb. i was not evaluating builders.
i know everything i need right now is covered by webpack, and for other developers it would be easy to understand whats happening.
What i heard from vite is they are focused more on dev, and not so on prod, but can't really give you a example.

@fcaps
Copy link
Collaborator Author

fcaps commented Nov 27, 2023

i also guess moving from webpack to vite is easier than from grunt to vite.
cleaning up the code was harder, than actual switch. never knew what is going on, and had to go in deeply to see if a file was used/working.

@Sheikah45
Copy link
Member

Understood, I was mostly curious as a framework I have been using made the switch from webpack to vite so was just curious if it was a general movement or just a framework preference.

@fcaps fcaps merged commit 373b885 into FAForever:develop Nov 27, 2023
4 checks passed
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.

Enable cache busting for assets on deploy
2 participants