Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transform function does not run #377

Open
5 tasks done
lloydjatkinson opened this issue Sep 14, 2024 · 0 comments
Open
5 tasks done

transform function does not run #377

lloydjatkinson opened this issue Sep 14, 2024 · 0 comments

Comments

@lloydjatkinson
Copy link

Describe the bug

Hi,

My transform function does not seem to run. I even added a console log in here, expecting some output in the terminal and I get none, so I believe the function is simply not being called.

            Icons({
                compiler: 'jsx',
                jsx: 'react',
                scale: 1,
                transform(svg) {
                    return svg.replace(/stroke-width="\d+(\.\d+)?"/, 'stroke-width="2"');
                },
            }),

I'm trying to update the stroke width, but the attribute does not get updated.

image

Reproduction

The react example

System Info

Windows, Node 21

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant