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

ES6 Import support? #25

Open
danwetherald opened this issue Nov 5, 2018 · 2 comments
Open

ES6 Import support? #25

danwetherald opened this issue Nov 5, 2018 · 2 comments

Comments

@danwetherald
Copy link

How do you get this to work with ES6 imports?

import SVG from 'svg.js' import 'svg.path.js/svg.path.min.js'

This will throw an error:

TypeError: this.clear(...).attr is not a function

@misterbailey
Copy link

misterbailey commented Dec 15, 2018

Hey @dan003400, I had the same issue. Looks like the NPM package is out of date. Replacing
"svg.path.js": "^0.6.2" with "svg.path.js": "git+https://github.com/otm/svg.path.js.git" in my package.json fixed this for me.

@wesbos
Copy link

wesbos commented Nov 9, 2023

Worth pinning to the latest commit in case this project ever does get updated:

"svg.path.js": "git+https://github.com/otm/svg.path.js.git#6981166"

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

3 participants