svg.path.js icon indicating copy to clipboard operation
svg.path.js copied to clipboard

How does this work with npm+browserify?

Open hirasso opened this issue 7 years ago • 1 comments

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

hirasso avatar Feb 21 '18 18:02 hirasso

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";

iamgoodbytes avatar Sep 13 '18 09:09 iamgoodbytes