quarto-dev / quarto-dev/quarto-cli

Consider appending hash of .js as query param in OJS import statements

Open
#6,556 2 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Aug 18, 2023.

enhancement ojs-engine
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/6554

Originally posted by nwvhb August 18, 2023

Description

If you import code from a javascript file and then make an update to that file, the cached version of the file will be used by Chrome on your hosted page. Using quarto is there a way to specify the version of a javascript file? For an ordinary html file you can specify the version in the script tag as shown.

<script type="text/javascript" src="code.js?1500"></script>`

In the Quarto code, I'm unsure of how to do the same.

```{ojs}
import  {x} from  './code.js'

Thank you,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.