Use import maps #2031
Labels
Attempt
This might turn out to be not (easily) implementable. In this case we'll probably close the issue.
[C] Infrastructure
Infrastructural work around the main EvaP project
[T] Refactoring
Existing parts should become faster, more readable, or in any other way better.
Javascript / Typescript imports are a bit weird sometimes, for example you have to import from
.js
files when in a.ts
file. Additionally, we currently use thesupport_js_module_import_aggregation
option of Django'sManifestStaticFilesStorage
to change the imports of javascript files we serve so that they use a filename with a hash in it (this avoids fetching a cached, outdated file).However, there is also a builtin feature: Import maps. This way, we could switch out
utils.js
forutils
and also ensure that we are using the same version of a file everywhere.A nice bonus: Currently, all files including
foo.js
need to be updated when the hash offoo.js
changes and therefore also get a new hash and will not be cached anymore. This will not happen anymore with import maps.The text was updated successfully, but these errors were encountered: