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 does this work with npm+browserify? #22

Open
hirasso opened this issue Feb 21, 2018 · 1 comment
Open

How does this work with npm+browserify? #22

hirasso opened this issue Feb 21, 2018 · 1 comment

Comments

@hirasso
Copy link

hirasso commented Feb 21, 2018

Tried it like this, but it throws errors:

import SVG from 'svg.js';
import 'svg.path.js/svg.path.js';
let draw = SVG( 'drawing' );
var rect = draw.path().m({x: 100, y: 100}).C({x: 100, y: 200}, {x: 200, y: 200}, {x: 200, y: 100});

Drawing with only with svg.js works just fine

@iamgoodbytes
Copy link

Have you ever figured this out? I'm experiencing the same issue with parcel bundler:
Using the svg.js module is no problem, but once I start drawing paths it won't recognize the .L() function


import SVG from "../vendor/svg";
import svgpath from "../vendor/svg.path";

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