diff --git a/build.js b/build.js
new file mode 100644
index 0000000..92664af
--- /dev/null
+++ b/build.js
@@ -0,0 +1,31 @@
+// build.js
+import * as esbuild from "esbuild";
+
+const isDev = process.argv.includes("--dev");
+
+const config = {
+ entryPoints: ["frontend/static/frontend/ts/main.ts"], // il tuo entry point
+ bundle: true,
+ outdir: "frontend/static/frontend/dist",
+ format: "iife", // o 'iife' se serve per un tag
+
{% endblock %}
diff --git a/package.json b/package.json
index 55fea76..072d4f5 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,10 @@
{
"dependencies": {
- "@types/maplibre-gl": "^1.14.0"
+ "@types/maplibre-gl": "^1.14.0",
+ "esbuild": "^0.27.3"
+ },
+ "scripts": {
+ "dev": "bun run build.js --dev",
+ "build": "bun run build.js"
}
-}
\ No newline at end of file
+}