From 3b47e461f0773e619619f1bc838234fdd9920d90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Fri, 8 Sep 2023 21:22:16 +0200 Subject: [PATCH] use proper export map --- .config/rollup.config.js | 2 +- package.json | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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", -- 2.39.5