File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @cypress-design/css ' : patch
3+ ---
4+
5+ - remove dependency of @cypress-design/css to ` dedent `
6+ - merge the windicss config passed to plugins with the default config
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { UserOptions } from 'vite-plugin-windicss'
33import VitePlugin from 'vite-plugin-windicss'
44import WebpackPlugin from 'windicss-webpack-plugin'
55import windiConfig from './windi.config'
6+ import { merge } from 'lodash'
67
78function getConfig ( options : UserOptions ) {
89 const scan = typeof options . scan === 'boolean' ? { } : options . scan ?? { }
@@ -17,8 +18,8 @@ function getConfig(options: UserOptions) {
1718 )
1819
1920 return {
20- config : windiConfig ,
2121 ...options ,
22+ config : merge ( windiConfig , options . config ) ,
2223 scan : {
2324 ...( scan || { } ) ,
2425 include : [
Original file line number Diff line number Diff line change 66} from 'vite-plugin-windicss'
77import { IconExtractor } from './icon-color-plugins'
88import windiConfig from './windi.config'
9- import dedent from 'dedent'
109
1110export default function WindiKeepRollupPlugin ( ) : Plugin {
1211 const classSet = new Set < string > ( )
@@ -39,9 +38,7 @@ export default function WindiKeepRollupPlugin(): Plugin {
3938 await utils . ensureInit ( )
4039 const { success } = utils . processor . interpret ( [ ...classSet ] . join ( ' ' ) )
4140 if ( chunk ?. type === 'chunk' ) {
42- chunk . code += dedent `
43- /* <windicss-keep class="${ success . join ( ' ' ) } "> */
44- \n`
41+ chunk . code += `\n/* <windicss-keep class="${ success . join ( ' ' ) } "> */\n`
4542 }
4643 } ,
4744 }
You can’t perform that action at this time.
0 commit comments