From 1ad8cf373ed4a33ec338f455e8828c2351ec0633 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Sat, 7 Aug 2021 10:03:16 -0400 Subject: [PATCH] add exports field to package.json to comply with skypack.dev --- package.json | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 10cb7e8..369df03 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,19 @@ "type": "git", "url": "https://github.com/jakejarvis/dark-mode.git" }, - "main": "dist/dark-mode.cjs.js", - "module": "dist/dark-mode.esm.js", - "unpkg": "dist/dark-mode.min.js", - "types": "dist/dark-mode.d.ts", + "type": "module", + "files": [ + "dist" + ], + "main": "./dist/dark-mode.cjs.js", + "module": "./dist/dark-mode.esm.js", + "unpkg": "./dist/dark-mode.min.js", + "types": "./dist/dark-mode.d.ts", + "exports": { + "require": "./dist/dark-mode.cjs.js", + "import": "./dist/dark-mode.esm.js", + "browser": "./dist/dark-mode.min.js" + }, "scripts": { "build": "rollup -c", "lint": "eslint src/**/*.js", @@ -35,9 +44,6 @@ "rollup-plugin-filesize": "^9.1.1", "rollup-plugin-terser": "^7.0.2" }, - "files": [ - "dist" - ], "keywords": [ "frontend", "dark mode",