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

make this plugin works with tsup's bundle: false option #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dimaMachina
Copy link

I currently use patch, to make this plugin works with bundle: false

const svg = await readFile(args.path, { encoding: 'utf8' })

if (options.plugins && !options.plugins.includes('@svgr/plugin-jsx')) {
const svg = await readFile(args.path, 'utf8')
Copy link
Author

Choose a reason for hiding this comment

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

we can provide encoding as string in 2nd argument

Comment on lines +25 to -27
options.plugins ||= []
if (!options.plugins.includes('@svgr/plugin-jsx')) {
options.plugins.push('@svgr/plugin-jsx')
} else if (!options.plugins) {
options.plugins = ['@svgr/plugin-jsx']
Copy link
Author

Choose a reason for hiding this comment

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

just to look nicer

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.

1 participant