Skip to content

replace unmaintained vite-plugin-react-svg with vite-plugin-svgr - #3230

Merged
dimaMachina merged 5 commits into
graphql-react-exclude-deps-from-bundlefrom
replace-vite-svg-pkg
Jun 15, 2023
Merged

dimaMachina merged 5 commits into
graphql-react-exclude-deps-from-bundlefrom
replace-vite-svg-pkg

Conversation

@dimaMachina

@dimaMachina dimaMachina commented Jun 14, 2023 •

Copy link
Copy Markdown
Collaborator

@thomasheyenbrock I improved your generateIcon() function 😅

before (2 unneeded nested components)

image

now, only 1

image

@changeset-bot

changeset-bot Bot commented Jun 14, 2023 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2347c5f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

@@ -0,0 +1,77 @@
import { ComponentProps, FC } from 'react';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... I'm used to doing something like this in a vite plugin in my proprietary work, is there a way we can configure the plugin to do this, or copy the plugin source and tweak it as such?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

svgr plugin incorrectly shows the type string for imported svg files, even though we set up exportAsDefault: true in vite config, if you know how to fix it feel free

@dimaMachina
dimaMachina merged commit a997530 into graphql-react-exclude-deps-from-bundle Jun 15, 2023
@dimaMachina
dimaMachina deleted the replace-vite-svg-pkg branch June 15, 2023 10:06
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

Successfully merging this pull request may close these issues.

2 participants