fix sourcemaps
diff --git a/build.js b/build.js
index 79bd42e..0d5a3e9 100644
--- a/build.js
+++ b/build.js
@@ -33,10 +33,13 @@
     //Minify files function
     async function minifyFile(filePath) {
         //Run terser
-        var results = await minify(fs.readFileSync(filePath, "utf8"), {
+        var results = await minify({
+            [filePath]: fs.readFileSync(filePath, "utf8")
+        }, {
             sourceMap: {
                 url: "/" + filePath + ".map",
-                includeSources: true
+                includeSources: true,
+                root: "/"
             }
         });