diff --git a/index.js b/index.mjs similarity index 100% rename from index.js rename to index.mjs diff --git a/package.json b/package.json index 5bf2116c..c22a5387 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,13 @@ "version": "4.27.7", "description": "Generate a table of contents based on the heading structure of a html document.", "main": "./dist/tocbot.js", - "module": "./index.js", + "module": "./index.mjs", "exports": { ".": { "require": "./dist/tocbot.js", - "import": "./index.js", + "import": "./index.mjs", "types": "./index.d.ts", - "default": "./index.js" + "default": "./index.mjs" }, "./styles.css": "./dist/styles.css", "./tocbot.css": "./dist/tocbot.css",