try cmjs only

This commit is contained in:
Anton Lavrenov
2022-05-04 16:04:16 -05:00
parent 0a32772fa9
commit 149c8d83fd
5 changed files with 47 additions and 10 deletions

View File

@@ -5,18 +5,18 @@ function equal(val1, val2, message) {
}
// try to import only core
import Konva from '../lib/Core.js';
import Konva from 'konva';
// no external shapes
// equal(Konva.Rect, undefined, 'no external shapes');
import { Rect } from '../lib/shapes/Rect.js';
import { Rect } from 'konva/lib/shapes/Rect';
equal(Rect !== undefined, true, 'Rect is defined');
equal(Konva.Rect, Rect, 'Rect is injected');
import Konva2 from '../lib/index-node.js';
import Konva2 from 'konva';
equal(Konva2.Rect, Rect, 'Rect is injected');