mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-27 05:38:51 +01:00
🚀 feat: Refactor schema exports and update package version to 0.0.4 (#6455)
This commit is contained in:
parent
b70d9f1a82
commit
c58a9c4f33
5 changed files with 119 additions and 85 deletions
|
|
@ -1,25 +1,40 @@
|
|||
import json from '@rollup/plugin-json';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
||||
|
||||
export default {
|
||||
input: 'src/index.ts',
|
||||
output: [
|
||||
{
|
||||
file: 'dist/index.cjs', // Changed from index.js to index.cjs
|
||||
format: 'cjs',
|
||||
file: 'dist/index.es.js',
|
||||
format: 'es',
|
||||
sourcemap: true,
|
||||
exports: 'named',
|
||||
},
|
||||
{
|
||||
file: 'dist/index.es.js',
|
||||
format: 'esm',
|
||||
file: 'dist/index.cjs',
|
||||
format: 'cjs',
|
||||
sourcemap: true,
|
||||
exports: 'named',
|
||||
},
|
||||
],
|
||||
plugins: [json(), commonjs(), typescript({ tsconfig: './tsconfig.json' })],
|
||||
external: [
|
||||
// list your external dependencies
|
||||
plugins: [
|
||||
// Allow importing JSON files
|
||||
json(),
|
||||
// Automatically externalize peer dependencies
|
||||
peerDepsExternal(),
|
||||
// Resolve modules from node_modules
|
||||
nodeResolve(),
|
||||
// Convert CommonJS modules to ES6
|
||||
commonjs(),
|
||||
// Compile TypeScript files and generate type declarations
|
||||
typescript({
|
||||
tsconfig: './tsconfig.json',
|
||||
declaration: true,
|
||||
declarationDir: 'dist/types',
|
||||
rootDir: 'src',
|
||||
}),
|
||||
],
|
||||
// Do not bundle these external dependencies
|
||||
external: ['mongoose'],
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue