mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 16:43:25 +00:00
fix build?
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import FormData = require('form-data');
|
import FormData from 'form-data';
|
||||||
|
|
||||||
import { FetcherOptions } from '@/fetchers/types';
|
import { FetcherOptions } from '@/fetchers/types';
|
||||||
|
|
||||||
|
@@ -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,
|
||||||
|
@@ -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'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user