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

Retire static file delivered in /public and move to webpack and /dist #500

Open
fcaps opened this issue Nov 28, 2023 · 0 comments
Open

Retire static file delivered in /public and move to webpack and /dist #500

fcaps opened this issue Nov 28, 2023 · 0 comments

Comments

@fcaps
Copy link
Collaborator

fcaps commented Nov 28, 2023

Since we already moved the js files to dist, next up would be images and css.

Why?

  1. the entry is used on the root path 'public->""' here, so every file not found will create a request and will trigger the 404 handler and we can't configure with fallthrough
    this is problematic if we deliver html for a jpeg and loads of wasted cpu cycles.
    example favicon.png, index.js.map etc. are common requests that a browser does without telling them todo so.

  2. making all the scss publicly available is nothing too risky, since we are opensource, but also not clean

3.when everything is in dist, it is also clearer what will be delivered, and what is private.

PS: the images used are mostly not optimized for web, big sizes with poor compression, we could auto optimize them on docker-build, or use a one-time conversion to reduce some of the size without too much complexity as if we use a cdn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant