From 7a918d1fed124142e931cd35bcc6203c59fab0b2 Mon Sep 17 00:00:00 2001 From: Justin Taddei Date: Wed, 11 Sep 2024 12:35:25 -0600 Subject: [PATCH] fix: incorrect mapping of mjs files in nuxt3 (#790) --- package.json | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0f8e841..fbe7bca 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,17 @@ "module": "dist/index.js", "types": "dist/index.d.ts", "unpkg": "dist/index.global.js", - "files": [ - "dist/**/*", - "nuxt/**/*" - ], + "files": ["dist/**/*", "nuxt/**/*"], + "exports": { + "./nuxt": { + "import": "./nuxt/index.ts", + "require": "./nuxt/v2/index.cjs" + }, + ".": { + "import": "./dist/index.js", + "require": "./dist/index.cjs" + } + }, "scripts": { "build": "tsup src/index.ts --clean --dts --format esm,cjs,iife --global-name VWave", "dev": "tsup src/index.ts --watch --dts --format esm,cjs,iife --global-name VWave",