File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,21 @@ module.exports = {
227227 {
228228 ' @fluentui/react-icons' : {
229229 transform : (importName ) => {
230+ // Handle utility imports (bundleIcon, className constants)
231+ const utilityExports = [
232+ ' bundleIcon' ,
233+ ' iconClassName' ,
234+ ' iconFilledClassName' ,
235+ ' iconRegularClassName' ,
236+ ' iconColorClassName' ,
237+ ' iconLightClassName'
238+ ];
239+
240+ if (utilityExports .includes (importName)) {
241+ return ' @fluentui/react-icons/utils' ;
242+ }
243+
244+ // Handle icon imports
230245 const withoutSuffix = importName .replace (
231246 / (\d * )? (Regular| Filled| Light| Color)$ / ,
232247 ' '
@@ -262,6 +277,12 @@ If you use SWC for transpilation, add [@swc/plugin-transform-imports](https://ww
262277 {
263278 " @fluentui/react-icons" : {
264279 " transform" : [
280+ // Transform utility imports to /utils
281+ [
282+ " ^(bundleIcon|iconClassName|iconFilledClassName|iconRegularClassName|iconColorClassName|iconLightClassName)$" ,
283+ " @fluentui/react-icons/utils"
284+ ],
285+ // Transform icon imports to /svg/{icon-name}
265286 [
266287 " (\\ D*)(\\ d*)?(Regular|Filled|Light|Color)" ,
267288 " @fluentui/react-icons/svg/{{ kebabCase memberMatches.[1] }}"
You can’t perform that action at this time.
0 commit comments