Skip to content

Commit 2d33725

Browse files
authored
vite: switch to default css minifier (#3955)
* vite: switch to default css minifier * tweak docs
1 parent 9d203a7 commit 2d33725

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,6 @@ The DataGrid component is designed to handle large datasets efficiently while of
5353
- [Changelog](CHANGELOG.md)
5454
- [Contributing](CONTRIBUTING.md)
5555

56-
> **Important** <br />
57-
> `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
58-
59-
```ts
60-
build: {
61-
....,
62-
cssMinify: 'esbuild'
63-
}
64-
```
65-
6656
## Installation
6757

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

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

84+
> **Important** <br />
85+
> 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.
86+
87+
```ts
88+
build: {
89+
cssMinify: 'esbuild',
90+
// or
91+
cssTarget: 'esnext'
92+
}
93+
```
94+
9495
## Getting started
9596

9697
Here is a basic example of how to use `react-data-grid` in your React application:

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default defineConfig(
102102
sourcemap: true,
103103
reportCompressedSize: false,
104104
// https://github.com/parcel-bundler/lightningcss/issues/873
105-
cssMinify: 'esbuild'
105+
cssTarget: 'esnext'
106106
},
107107
plugins: [
108108
ecij(),

0 commit comments

Comments
 (0)