From: Ulrich-Matthias Schäfer Date: Fri, 8 Sep 2023 19:22:16 +0000 (+0200) Subject: use proper export map X-Git-Tag: 3.2.1~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b47e461f0773e619619f1bc838234fdd9920d90;p=svg.js.git use proper export map --- diff --git a/.config/rollup.config.js b/.config/rollup.config.js index 586e8ea..aaf1e78 100644 --- a/.config/rollup.config.js +++ b/.config/rollup.config.js @@ -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', diff --git a/package.json b/package.json index 6e3fb0b..fab5c79 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,15 @@ "animation" ], "author": "Wout Fierens ", - "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",