From 6805a79f1ccbf1c6aa7b9860481a3c35fa40e97d Mon Sep 17 00:00:00 2001 From: mrjvs Date: Wed, 21 Jun 2023 15:12:45 +0200 Subject: [PATCH] update more configs and stuff --- package.json | 6 +++--- tsconfig.json | 3 +-- vite.config.js | 13 +++++++++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 732d8c5..e4fd977 100644 --- a/package.json +++ b/package.json @@ -2,15 +2,15 @@ "name": "@movie-web/providers", "version": "0.0.2", "description": "Package that contains all the providers of movie-web", - "main": "./lib/providers.umd.cjs", + "main": "./lib/providers.umd.js", "types": "./lib/providers.d.ts", "files": [ "./lib" ], "exports": { ".": { - "import": "./lib/providers.js", - "require": "./lib/providers.umd.cjs" + "import": "./lib/providers.mjs", + "require": "./lib/providers.umd.js" } }, "repository": { diff --git a/tsconfig.json b/tsconfig.json index d0b7b63..e1c2373 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,8 +11,7 @@ "isolatedModules": false, "paths": { "@/*": ["./*"] - }, - "types": ["vitest/globals"] + } }, "include": ["src"], "exclude": ["node_modules", "**/__tests__/*"] diff --git a/vite.config.js b/vite.config.js index 444393a..5217c56 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,17 +3,26 @@ const { defineConfig } = require('vitest/config'); const { default: eslint } = require('vite-plugin-eslint'); const dts = require('vite-plugin-dts'); +const main = path.resolve(__dirname, 'src/index.ts'); + module.exports = defineConfig({ - plugins: [eslint(), dts()], + plugins: [ + eslint(), + dts({ + include: [main], + }), + ], resolve: { alias: { '@': path.resolve(__dirname, './src'), }, }, build: { + minify: false, outDir: 'lib', + lib: { - entry: path.resolve(__dirname, 'src/index.ts'), + entry: main, name: 'providers', fileName: 'providers', },