diff --git a/src/js/public-path-override.js b/src/js/public-path-override.js
new file mode 100644
index 0000000000..970e6d20fc
--- /dev/null
+++ b/src/js/public-path-override.js
@@ -0,0 +1,5 @@
+const baseURL = window.ONS_assets_base_URL;
+
+if (baseURL) {
+ __webpack_public_path__ = baseURL;
+}
diff --git a/src/styles/page-template/_template.njk b/src/styles/page-template/_template.njk
index 7e357ecd42..066b4116d8 100644
--- a/src/styles/page-template/_template.njk
+++ b/src/styles/page-template/_template.njk
@@ -85,6 +85,9 @@
{% endblock %}
{% block bodyEnd %}{% endblock %}
+ {% if data.version %}
+
+ {% endif %}
diff --git a/webpack.common.js b/webpack.common.js
index a7a91bb82b..bb5e61fa49 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -53,12 +53,11 @@ const core = {
const jsCore = merge(core, {
entry: {
- 'scripts/bundle': ['./js/polyfills/index.js', './js/index.js'],
+ 'scripts/bundle': ['./js/public-path-override.js', './js/polyfills/index.js', './js/index.js'],
'scripts/patternlib': ['./js/patternlib/index.js']
},
output: {
- publicPath: '/',
chunkFilename: 'scripts/[name].js'
},