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

[Fix] Fix crash when svg has a style tag in the root element #116

Merged
merged 1 commit into from
Feb 18, 2023
Merged

[Fix] Fix crash when svg has a style tag in the root element #116

merged 1 commit into from
Feb 18, 2023

Conversation

dozgunyal
Copy link

@dozgunyal dozgunyal commented Sep 2, 2022

Hi,
Fixes #105

Also sends the path name to SVGO.optimize as recommended and fixes the PrefixIds plugin to support dynamic file name prefixes.

Thank you in advance.

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

What's the benefit of passing the path to optimize?

src/optimize.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
@dozgunyal
Copy link
Author

What's the benefit of passing the path to optimize?

some plugins like prefixId depends on it. Such as adding the file name as prefix to all ids, which is super helpful to prevent style conflicts

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Looks good

@ljharb

This comment was marked as resolved.

@akellbl4

This comment was marked as resolved.

@ljharb

This comment was marked as resolved.

@ljharb ljharb merged commit a4c1c4c into airbnb:master Feb 18, 2023
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.

Build error after upgrading from 1.1.2 to 2.0.1
3 participants