Skip to content

Is it work with svg.js 3.0 ? #50

@VitaliyAT

Description

@VitaliyAT

Draw line, add first filter in example

image.filterWith(function(add) {
  add.gaussianBlur(30)
})

IF Put it (svg.filter.js) in html after svg.js AS IS:

<script src="js/svg.js"></script>
<script src="js/svg.filter.js"></script>

THEN
But get in console:

Uncaught SyntaxError: Cannot use import statement outside a module

ELSIF AS IS (type="module" added):

<script src="js/svg.js"></script>
<script type="module" src="js/svg.filter.js"></script>

THEN

Uncaught TypeError: Failed to resolve module specifier "@svgdotjs/svg.js". Relative references must start with either "/", "./", or "../".

"@svgdotjs/svg.js" installed through npm as:

npm i @svgdotjs/svg.js --save-def

"@svgdotjs/svg.filter.js" installed as:

npm i @svgdotjs/svg.filter.js --save-def

"dependencies": {
    "@svgdotjs/svg.js": "^3.0.16",
    "@svgdotjs/svg.filter.js": "^3.0.7"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions