diff --git a/Makefile b/Makefile
index 0f377e7c..5eeddcbc 100644
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,7 @@ govukAssets::
npx nps copy.govukAssets
javascripts:
+ npm run build
rsync -r assets/javascripts static/
robots:
@@ -122,6 +123,7 @@ frontend:
make stylesheets
make govukAssets
rsync -r assets/images static/
+ cp node_modules/maplibre-gl/dist/maplibre-gl.css static/stylesheets/maplibre-gl.css
frontend-all: clean frontend
diff --git a/application/templates/entity.html b/application/templates/entity.html
index d2c7147b..416daa99 100644
--- a/application/templates/entity.html
+++ b/application/templates/entity.html
@@ -29,8 +29,8 @@
{% endblock %}
{%- block mapAssets %}
-
-
+
+
{{ super() }}
{% endblock -%}
diff --git a/application/templates/national-map.html b/application/templates/national-map.html
index 83d5a309..24aee274 100644
--- a/application/templates/national-map.html
+++ b/application/templates/national-map.html
@@ -14,8 +14,8 @@
%}
{%- block mapAssets %}
-
-
+
+
{{ super() }}
{% endblock -%}
diff --git a/application/templates/search.html b/application/templates/search.html
index 8dff8e4b..acd28251 100644
--- a/application/templates/search.html
+++ b/application/templates/search.html
@@ -12,8 +12,8 @@
{% from 'components/pagination/macro.jinja' import appPagination %}
{%- block mapAssets %}
-
-
+
+
{{ super() }}
{% endblock -%}
diff --git a/package.json b/package.json
index 2c98795b..e8ca351f 100644
--- a/package.json
+++ b/package.json
@@ -31,13 +31,14 @@
"test": "vitest run",
"coverage": "vitest run --coverage",
"test-unit": "vitest run --dir tests/unit/javascript",
- "test-integration": "vitest run --dir tests/integration/javascript"
+ "test-integration": "vitest run --dir tests/integration/javascript",
+ "build": "rollup -c"
},
"dependencies": {
"copyfiles": "^2.4.1",
"govuk-frontend": "4.2.0",
- "node-sass": "^9.0.0",
- "nps": "^5.10.0"
+ "maplibre-gl": "^4.1.2",
+ "node-sass": "^9.0.0"
},
"devDependencies": {
"@vitest/coverage-v8": "^0.34.1",
diff --git a/rollup.config.js b/rollup.config.js
new file mode 100644
index 00000000..57ea7535
--- /dev/null
+++ b/rollup.config.js
@@ -0,0 +1,10 @@
+// get the config object from the package file
+module.exports = [
+ {
+ input: `./node_modules/maplibre-gl/dist/maplibre-gl.js`,
+ output: {
+ file: `static/javascripts/maplibre-gl.js`,
+ format: "iife",
+ }
+ },
+];