Merge branch 'dev'

This commit is contained in:
mrjvs
2023-09-06 19:46:24 +02:00
5 changed files with 13 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@movie-web/providers", "name": "@movie-web/providers",
"version": "0.0.5", "version": "0.0.6",
"description": "Package that contains all the providers of movie-web", "description": "Package that contains all the providers of movie-web",
"main": "./lib/index.umd.js", "main": "./lib/index.umd.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",

View File

@@ -1,4 +1,4 @@
import FormData = require('form-data'); import FormData from 'form-data';
import { FetcherOptions } from '@/fetchers/types'; import { FetcherOptions } from '@/fetchers/types';

View File

@@ -1,7 +1,7 @@
export type CommonMedia = { export type CommonMedia = {
title: string; title: string;
releaseYear: number; releaseYear: number;
imbdId: string; imdbId?: string;
tmdbId: string; tmdbId: string;
}; };

View File

@@ -2,7 +2,8 @@
"compilerOptions": { "compilerOptions": {
"target": "es2021", "target": "es2021",
"lib": ["es2021"], "lib": ["es2021"],
"module": "commonjs", "module": "CommonJS",
"esModuleInterop": true,
"declaration": true, "declaration": true,
"outDir": "./lib", "outDir": "./lib",
"strict": true, "strict": true,

View File

@@ -2,6 +2,7 @@ const path = require('path');
const { defineConfig } = require('vitest/config'); const { defineConfig } = require('vitest/config');
const { default: eslint } = require('vite-plugin-eslint'); const { default: eslint } = require('vite-plugin-eslint');
const dts = require('vite-plugin-dts'); const dts = require('vite-plugin-dts');
const pkg = require('./package.json');
const main = path.resolve(__dirname, 'src/index.ts'); const main = path.resolve(__dirname, 'src/index.ts');
@@ -14,12 +15,19 @@ module.exports = defineConfig({
}, },
build: { build: {
minify: false, minify: false,
rollupOptions: {
external: Object.keys(pkg.dependencies),
output: {
globals: Object.fromEntries(Object.keys(pkg.dependencies).map((v) => [v, v])),
},
},
outDir: 'lib', outDir: 'lib',
lib: { lib: {
entry: main, entry: main,
name: 'index', name: 'index',
fileName: 'index', fileName: 'index',
formats: ['umd', 'es'],
}, },
}, },
}); });