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

how to provide independent scope for each svg component? #85

Closed
huyansheng3 opened this issue Nov 2, 2017 · 2 comments
Closed

how to provide independent scope for each svg component? #85

huyansheng3 opened this issue Nov 2, 2017 · 2 comments

Comments

@huyansheng3
Copy link

image
in two svg file ,all define the same id ! but then later id cannot working ! so how to provider independent scope for each svg component ?

@nebaff
Copy link

nebaff commented Nov 3, 2017

id MUST be unique in all html page (or encapsutate svg in iframe)
you cannot violate this.

BUT in order to avoid problem you can use config param propsMap to revrite id to another propertyname :

 example :
  propsMap: {
                     fillRule: 'fill-rule',
                     id: 'data-id'
                 },

@huyansheng3
Copy link
Author

ok, have solved this problem with svgo-loader.

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

2 participants