From 55b4f10543a4d7144d4ed984f09d8c5f3157f6b3 Mon Sep 17 00:00:00 2001
From: David Sveningsson <ext@sidvind.com>
Date: Fri, 17 Jun 2022 01:53:04 +0200
Subject: [PATCH] feat: support node exports field

---
 README.md    | 4 ++--
 package.json | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index a33fc038..baf29c87 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ With NPM 7 or later it will be satisfied by the peer dependency but for a more c
 ### In `cypress/plugins/index.js`:
 
 ```js
-const htmlvalidate = require("cypress-html-validate/dist/plugin");
+const htmlvalidate = require("cypress-html-validate/plugin");
 
 module.exports = (on) => {
   htmlvalidate.install(on);
@@ -25,7 +25,7 @@ module.exports = (on) => {
 ### In `cypress/support/index.js`:
 
 ```js
-import "cypress-html-validate/dist/commands";
+import "cypress-html-validate/commands";
 ```
 
 ### In specs:
diff --git a/package.json b/package.json
index 16370ff1..fffc41a3 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,12 @@
   },
   "license": "MIT",
   "author": "David Sveningsson <ext@sidvind.com>",
+  "exports": {
+    ".": "./dist/index.js",
+    "./plugin": "./dist/plugin.js",
+    "./commands": "./dist/commands.js",
+    "./package.json": "./package.json"
+  },
   "main": "dist/index.js",
   "files": [
     "dist",
-- 
GitLab