File tree Expand file tree Collapse file tree 4 files changed +46
-0
lines changed
e2e/cases/css/css-minify-inherit Expand file tree Collapse file tree 4 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { readFile } from 'node:fs/promises' ;
2
+ import { join } from 'node:path' ;
3
+ import { build , dev , rspackOnlyTest } from '@e2e/helper' ;
4
+ import { expect } from '@playwright/test' ;
5
+
6
+ rspackOnlyTest (
7
+ 'should let lightningcss minimizer inherit from tools.lightningcssLoader' ,
8
+ async ( { page } ) => {
9
+ const cssIndex = join ( __dirname , 'dist/static/css/index.css' ) ;
10
+
11
+ await dev ( {
12
+ cwd : __dirname ,
13
+ page,
14
+ } ) ;
15
+ const devContent = await readFile ( cssIndex , 'utf-8' ) ;
16
+ expect ( devContent ) . toContain ( 'margin-inline-end: 100px;' ) ;
17
+
18
+ await build ( {
19
+ cwd : __dirname ,
20
+ } ) ;
21
+ const buildContent = await readFile ( cssIndex , 'utf-8' ) ;
22
+ expect ( buildContent ) . toContain ( 'margin-inline-end:100px' ) ;
23
+ } ,
24
+ ) ;
Original file line number Diff line number Diff line change
1
+ import { defineConfig } from '@rsbuild/core' ;
2
+
3
+ export default defineConfig ( {
4
+ dev : {
5
+ writeToDisk : true ,
6
+ } ,
7
+ output : {
8
+ filenameHash : false ,
9
+ overrideBrowserslist : [ 'Chrome >= 53' ] ,
10
+ } ,
11
+ tools : {
12
+ lightningcssLoader : {
13
+ exclude : {
14
+ logicalProperties : true ,
15
+ } ,
16
+ } ,
17
+ } ,
18
+ } ) ;
Original file line number Diff line number Diff line change
1
+ .foo {
2
+ margin-inline-end : 100px ;
3
+ }
Original file line number Diff line number Diff line change
1
+ import './index.css' ;
You can’t perform that action at this time.
0 commit comments