mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-26 13:18:51 +01:00
feat: update client package dependencies and Rollup configuration
- Added rollup-plugin-postcss to package.json and updated package-lock.json. - Enhanced Rollup configuration to include postcss plugin for CSS handling. - Updated index.ts to export all components from the components directory for better modularity.
This commit is contained in:
parent
2af4ca5b5c
commit
ae43b4eed0
4 changed files with 1087 additions and 9 deletions
1065
package-lock.json
generated
1065
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -48,6 +48,7 @@
|
|||
"rimraf": "^5.0.1",
|
||||
"rollup": "^4.0.0",
|
||||
"rollup-plugin-peer-deps-external": "^2.2.4",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"rollup-plugin-typescript2": "^0.35.0",
|
||||
"typescript": "^5.0.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
// ESM bundler config for React components
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import pkg from './package.json';
|
||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import terser from '@rollup/plugin-terser';
|
||||
import alias from '@rollup/plugin-alias';
|
||||
import { fileURLToPath } from 'url';
|
||||
import alias from '@rollup/plugin-alias';
|
||||
import terser from '@rollup/plugin-terser';
|
||||
import postcss from 'rollup-plugin-postcss';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import { dirname, resolve as pathResolve } from 'path';
|
||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
||||
import pkg from './package.json';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
|
@ -26,6 +27,16 @@ const plugins = [
|
|||
preventAssignment: true,
|
||||
}),
|
||||
commonjs(),
|
||||
postcss({
|
||||
// Extract CSS to a separate file
|
||||
extract: false,
|
||||
// Inject CSS into JS (better for component libraries)
|
||||
inject: true,
|
||||
// Minimize CSS in production
|
||||
minimize: process.env.NODE_ENV === 'production',
|
||||
// Enable CSS modules if needed
|
||||
modules: false,
|
||||
}),
|
||||
typescript({
|
||||
tsconfig: './tsconfig.json',
|
||||
useTsconfigDeclarationDir: true,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
// Components
|
||||
export { default as Toast } from './components/Toast';
|
||||
export * from './components';
|
||||
|
||||
// Hooks
|
||||
export * from './hooks';
|
||||
|
||||
export * from './common';
|
||||
// Common types
|
||||
export * from './common/types';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue