aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-09-08 21:22:16 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-09-08 21:22:52 +0200
commit3b47e461f0773e619619f1bc838234fdd9920d90 (patch)
treec308250e2e70a791e974bb7570bfa3c8b925019e
parent82778b7200a65d6f569da859353c103f8dd2ca2c (diff)
downloadsvg.js-3b47e461f0773e619619f1bc838234fdd9920d90.tar.gz
svg.js-3b47e461f0773e619619f1bc838234fdd9920d90.zip
use proper export map
-rw-r--r--.config/rollup.config.js2
-rw-r--r--package.json6
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 <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",