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:
Danny Avila 2025-07-13 08:53:32 -04:00 committed by Marco Beretta
parent 2af4ca5b5c
commit ae43b4eed0
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
4 changed files with 1087 additions and 9 deletions

1065
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -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"
}

View file

@ -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,

View file

@ -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';