fixes
This commit is contained in:
15
examples/issue-0014.sx
Normal file
15
examples/issue-0014.sx
Normal file
@@ -0,0 +1,15 @@
|
||||
// issue-0014: Feature request — {{{ CONTENT_HASH }}} template variable for wasm shell
|
||||
//
|
||||
// When targeting wasm, the compiler processes shell.html and substitutes
|
||||
// {{{ SCRIPT }}} with the <script> tag. Add a {{{ CONTENT_HASH }}} variable
|
||||
// that is a short hash (e.g. 8-char hex) of the final build outputs
|
||||
// (.js + .wasm + .data), so the shell can use it for cache busting:
|
||||
//
|
||||
// <script>
|
||||
// Module.locateFile=function(path){return path+'?v={{{ CONTENT_HASH }}}'};
|
||||
// </script>
|
||||
// <script async src="index.js?v={{{ CONTENT_HASH }}}"></script>
|
||||
//
|
||||
// This lets browsers cache until the next build, then bust automatically.
|
||||
// No changes needed to build.sx or modules/compiler.sx — just the compiler
|
||||
// recognizing the new placeholder during shell template substitution.
|
||||
Reference in New Issue
Block a user