Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@ The DataGrid component is designed to handle large datasets efficiently while of
- [Changelog](CHANGELOG.md)
- [Contributing](CONTRIBUTING.md)

> **Important** <br />
> `rolldown-vite` by default uses `lightningcss` to minify css which has a [bug minifying light-dark syntax](https://github.com/parcel-bundler/lightningcss/issues/873). You can switch to `esbuild` as a workaround

```ts
build: {
....,
cssMinify: 'esbuild'
}
```

## Installation

Install `react-data-grid` using your favorite package manager:
Expand Down Expand Up @@ -91,6 +81,17 @@ import 'react-data-grid/lib/styles.css';

`react-data-grid` is published as ECMAScript modules for evergreen browsers, bundlers, and server-side rendering.

> **Important** <br />
> Vite 8+ by default uses `lightningcss` to minify css which has a [bug minifying light-dark syntax](https://github.com/parcel-bundler/lightningcss/issues/873). You can tweak the `cssMinify` or `cssTarget` [settings](https://main.vite.dev/config/build-options) as a workaround.

```ts
build: {
cssMinify: 'esbuild',
// or
cssTarget: 'esnext'
}
```

## Getting started

Here is a basic example of how to use `react-data-grid` in your React application:
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default defineConfig(
sourcemap: true,
reportCompressedSize: false,
// https://github.com/parcel-bundler/lightningcss/issues/873
cssMinify: 'esbuild'
cssTarget: 'esnext'
},
plugins: [
ecij(),
Expand Down