konva-es
v10.0.12
Published
[konva-es](https://github.com/tbo47/konva-es/) is [konva](https://github.com/konvajs/konva) at esm format.
Readme
konva-es is konva at esm format.
ES2015 module is more efficient than other formats and can facilitate the creation of smaller bundle size through tree-shaking technique.
npm i konva-es
Imports need to be update to konva-es. Ex:
import { Layer } from "konva-es/lib/Layer";
import { Shape } from "konva-es/lib/Shape";
import { Stage } from "konva-es/lib/Stage";
import { Circle } from "konva-es/lib/shapes/Circle";
import { Line } from "konva-es/lib/shapes/Line";
import { Rect } from "konva-es/lib/shapes/Rect";Demo of more advanced components
Test locally
Clone konva: git clone [email protected]:konvajs/konva.git (your forked version would be better)
Clone this repo: git clone [email protected]:tbo47/konva-es.git
konva and konva-es need to be in the same folder for the script to work.
cd konva-es ; ./build-esm.sh
It transpiles konva to esm format. And does npm link for you.
npm link konva-es in your project to use it.
Note: tested on macos with nodejs 20
