File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ export interface IduxResolverOptions {
2727 * import style along with components
2828 */
2929 importStyle ?: 'css' | 'less'
30+ /**
31+ * theme for import style
32+ *
33+ * @default 'default'
34+ */
35+ importStyleTheme ?: string
3036}
3137
3238/**
@@ -38,7 +44,7 @@ export function IduxResolver(options: IduxResolverOptions = {}): ComponentResolv
3844 return {
3945 type : 'component' ,
4046 resolve : ( name : string ) => {
41- const { importStyle, exclude = [ ] } = options
47+ const { importStyle, importStyleTheme = 'default' , exclude = [ ] } = options
4248 if ( exclude . includes ( name ) )
4349 return
4450
@@ -56,7 +62,7 @@ export function IduxResolver(options: IduxResolverOptions = {}): ComponentResolv
5662
5763 let sideEffects : string | undefined
5864 if ( packageName !== 'cdk' && importStyle )
59- sideEffects = `${ path } /style/themes/${ importStyle === 'css' ? 'default_css' : 'default' } `
65+ sideEffects = `${ path } /style/themes/${ importStyle === 'css' ? ` ${ importStyleTheme } _css` : importStyleTheme } `
6066
6167 return { name, from : path , sideEffects }
6268 } ,
You can’t perform that action at this time.
0 commit comments