@@ -63,31 +63,30 @@ const entryModuleContent = iconImportLines
63
63
. concat ( exports )
64
64
. join ( '\n' )
65
65
66
- const iconUtilTypes = `
67
- export declare type IconSource = React.FunctionComponent<React. SVGProps<SVGSVGElement>>
66
+ const entryTypesContent = `
67
+ export declare type IconSource = (props: SVGProps<SVGSVGElement>) => JSX.Element
68
68
export declare type BezierIcon = IconSource & { __type: 'BezierIcon' }
69
69
70
70
export declare function isBezierIcon(arg: unknown): arg is BezierIcon
71
71
export declare function createBezierIcon(icon: IconSource): BezierIcon
72
72
73
73
export declare type IconName = ${ iconNames . join ( ' | ' ) }
74
-
75
74
/**
76
75
* @deprecated If you import this module, all icons are bundled, so please import and use the individual icons.
77
76
* @example
78
77
* import { AllIcon } from '@channel.io/bezier-icons'
79
78
*/
80
79
export declare const icons: Record<IconName, BezierIcon>
81
- ` . trim ( )
82
80
83
- const entryTypesContent = `${ iconUtilTypes } \n\n${ iconComponentTypes . join ( '\n' ) } \n`
81
+ ${ iconComponentTypes . join ( '\n' ) }
82
+ ` . trim ( )
84
83
85
84
/**
86
85
* @type {import('rollup').PluginImpl }
87
86
*/
88
87
function emitFile ( { fileName, source } ) {
89
88
return {
90
- name : 'emit-file ' ,
89
+ name : 'emitFile ' ,
91
90
buildEnd ( ) {
92
91
if ( source . length === 0 ) {
93
92
this . warn ( 'source content is empty' )
@@ -157,7 +156,7 @@ function svgBuild(options = {}) {
157
156
const optimizedSvgs = [ ]
158
157
159
158
return {
160
- name : 'buildSvg ' ,
159
+ name : 'svgBuild ' ,
161
160
async transform ( code , id ) {
162
161
if ( ! filter ( id ) || ! id . endsWith ( '.svg' ) ) { return null }
163
162
@@ -272,7 +271,7 @@ export default defineConfig([
272
271
typescript ( ) ,
273
272
svgBuild ( { include : `${ iconBasePath } /*.svg` } ) ,
274
273
/**
275
- * The module is not resolving well, so use the alias plugin to resolve the module.
274
+ * Module resolution is not working well inside the virtual module , so use the alias plugin to resolve the module manually .
276
275
*/
277
276
alias ( {
278
277
entries : [ {
0 commit comments