diff --git a/package.json b/package.json index fc4e74a..be6e8ba 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,9 @@ "author": "Nextcloud GmbH and Nextcloud contributors", "type": "module", "exports": { - ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.cjs", - "import": "./dist/index.mjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" }, - "main": "dist/index.js", "files": [ "dist", "AUTHORS.md", diff --git a/tsconfig.json b/tsconfig.json index aad1c5e..bc0edb6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,8 +12,8 @@ "erasableSyntaxOnly": true, "rewriteRelativeImportExtensions": true, "lib": [ - "es6", - "dom" + "ESNext", + "DOM" ], } } \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 3eb2aaa..b92c7c3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,13 +2,9 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: GPL-3.0-or-later */ + import { createLibConfig } from '@nextcloud/vite-config' -export default createLibConfig( - { - index: `${__dirname}/lib/index.ts`, - }, - { - libraryFormats: ['cjs', 'es'], - }, -) +export default createLibConfig({ + index: 'lib/index.ts', +})