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

Make JavaScript build pipeline less confusing #587

Open
zarino opened this issue Jul 18, 2024 · 0 comments
Open

Make JavaScript build pipeline less confusing #587

zarino opened this issue Jul 18, 2024 · 0 comments
Labels
tech debt This was caused by us choosing a quicker solution earlier on

Comments

@zarino
Copy link
Member

zarino commented Jul 18, 2024

There are files in /vendor/*/js/ that aren’t used any more, because we compile our JavaScript with script/build_js and that uses esbuild to include third-party libraries from node_modules (I think?).

Meanwhile, code seems to be scattered at random throughout area.esm.js, explore.esm.js, and home.js (note, no esm?) and pages like area.html and explore.html load both home-out-esm.js and their page-specific file.

JavaScript and CSS files seem to be handled differently between local development (with DEBUG=True), local development (with DEBUG=False) and the live environment.

It’s also awkward (during local development) that the script/build_js step is manual, and separate from the Django staticfiles/compressor pipeline. See #486.

Ultimately, this is all just a bit confusing, and not documented in the README or in comments anywhere, and I just wasted a few hours today trying (and failing) to diagnose a weird JavaScript behaviour, and this opaqueness didn’t help.

@zarino zarino added the tech debt This was caused by us choosing a quicker solution earlier on label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt This was caused by us choosing a quicker solution earlier on
Projects
None yet
Development

No branches or pull requests

1 participant