You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently make build needs to be run locally when making changes to static assets and the minified assets are placed in the source tree rather than a separate build directory. This is not immediately obvious or documented in the README. It is also surprising coming from our other apps where minified assets are kept separate from the source tree.
My preference here would be to not minify assets at all for local development and only minify as part of the Docker image build, as we do for our other apps. A more minimal change is to make sure the steps to update static assets are documented both in the README and the description output when running make with no arguments.
The text was updated successfully, but these errors were encountered:
I encountered this again today while trying to update PDF.js to the latest release and being confused as to why changes to the pdfjs-init.js script did not take effect.
Looking at the assets that we have, I think the only processing for static assets that is worthwhile and can't be left to the CDN (eg. Cloudflare can handle gzip compression) is minifying the PDF.js build, since that's the only large asset where compression is worthwhile.
For developer familiarity we might want to consider making the static asset setup more alike our other projects:
Place generated assets in the build/ directory at the root of the project
Use a gulpfile to handle populating the build/ directory
Use h-assets to serve assets from the build/ directory
Static asset serving based on h-assets was added in #905 for a new frontend app within Via (the video player). We still have the existing system for serving the PDF viewer and I'd like to unify the two in future.
Currently
make build
needs to be run locally when making changes to static assets and the minified assets are placed in the source tree rather than a separatebuild
directory. This is not immediately obvious or documented in the README. It is also surprising coming from our other apps where minified assets are kept separate from the source tree.My preference here would be to not minify assets at all for local development and only minify as part of the Docker image build, as we do for our other apps. A more minimal change is to make sure the steps to update static assets are documented both in the README and the description output when running
make
with no arguments.The text was updated successfully, but these errors were encountered: