]> source.dussan.org Git - svg.js.git/commitdiff
use proper export map
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>
Fri, 8 Sep 2023 19:22:16 +0000 (21:22 +0200)
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>
Fri, 8 Sep 2023 19:22:52 +0000 (21:22 +0200)
.config/rollup.config.js
package.json

index 586e8ea86e9678583a8d55a6d16b62ce6597442a..aaf1e783201b865cd3d0bd610f4d5c511aa84ba3 100644 (file)
@@ -105,7 +105,7 @@ const config = (node, min, esm = false) => ({
     file: esm
       ? './dist/svg.esm.js'
       : node
-      ? './dist/svg.node.js'
+      ? './dist/svg.node.cjs'
       : min
       ? './dist/svg.min.js'
       : './dist/svg.js',
index 6e3fb0b8a3a5750f5aeb96b5030eab0f85870f59..fab5c79129b23ece890c3144ee5f494a48932a76 100644 (file)
     "animation"
   ],
   "author": "Wout Fierens <wout@mick-wout.com>",
-  "main": "dist/svg.node.js",
+  "main": "dist/svg.node.cjs",
   "unpkg": "dist/svg.min.js",
   "jsdelivr": "dist/svg.min.js",
   "browser": "dist/svg.esm.js",
   "module": "src/main.js",
+  "exports": {
+    "import": "./src/main.js",
+    "require": "./dist/svg.node.cjs"
+  },
   "files": [
     "/dist",
     "/src",