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

[Optimization] Minify json files in build directory (after beta rebase) #3214

Merged

Conversation

flx-sta
Copy link
Collaborator

@flx-sta flx-sta commented Jul 29, 2024

VITE UPDATE (v4 => v5)

Also updated by #3213 but much cleaner

I had to bump vite up to v5 due to this issue
vitejs/vite#15714

Otherwise typedoc would have failed constantly.

Why does typedoc suddenly fail?
Because I'm using node types inside my self-written json-minify plugin. To be exact the filesystem fs type. vite is "copying" those types but since node v18++ those copied type are out of date. The vite team hasn't migrated that fix into v4 yet and there is no indicator to do that yet.

Duplicate of #3073


What are the changes?

it minifies all the json files in the given directorties (currently /dist/images and /dist/battle-anim). That way we can work with the beautified jsons but the users retrieve the minified ones.

Why am I doing these changes?

Reduce file-size load

What did change?

Added the minifyJson plugin to the vite.config.

Screenshots/Videos

image image

How to test the changes?

  1. Run npm run build
  2. Check the /dist/images and /dist/battle-anim folders for json files
  3. they should be minified

Checklist

  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I tested the changes (manually)?
    • Are all unit tests still passing? (npm run test)

it minifies all the json files in the given directorties (currently `/dist/images` and `/dist/battle-anim`). That way we can work with the beautified jsons but the users retrieve the minified ones.
@flx-sta flx-sta added the Enhancement New feature or request label Jul 29, 2024
@flx-sta flx-sta marked this pull request as ready for review July 29, 2024 15:04
@flx-sta flx-sta changed the base branch from main to beta July 29, 2024 15:17
@Tempo-anon Tempo-anon merged commit d3e5a68 into pagefaultgames:beta Jul 29, 2024
4 checks passed
@flx-sta flx-sta deleted the optimization/minify-jsons-in-build-2 branch July 30, 2024 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants