diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/ui.js b/packages/node_modules/@node-red/editor-api/lib/editor/ui.js index 998816f5e..00e32dd5f 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/ui.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/ui.js @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ +const crypto = require('crypto') var express = require('express'); var fs = require("fs"); var path = require("path"); @@ -28,6 +29,8 @@ var editorClientDir = path.dirname(require.resolve("@node-red/editor-client")); var defaultNodeIcon = path.join(editorClientDir,"public","red","images","icons","arrow-in.svg"); var editorTemplatePath = path.join(editorClientDir,"templates","index.mst"); var editorTemplate; +const version = require(path.join(editorClientDir,"package.json")).version +const cacheBuster = crypto.createHash('md5').update(version).digest("hex").substring(0,12) module.exports = { init: function(_runtimeAPI) { @@ -99,6 +102,7 @@ module.exports = { } res.send(Mustache.render(editorTemplate,{ sessionMessages, + cacheBuster, ...await theme.context() })); }, diff --git a/packages/node_modules/@node-red/editor-client/templates/index.mst b/packages/node_modules/@node-red/editor-client/templates/index.mst index 01bf06545..748a54bab 100644 --- a/packages/node_modules/@node-red/editor-client/templates/index.mst +++ b/packages/node_modules/@node-red/editor-client/templates/index.mst @@ -24,24 +24,24 @@