I am currently thinking of using "fabric-webpack" and looking at the demo using react " https://codesandbox.io/s/8k7kvwqx70?file=/src/index.js "
I under import {... } from '....'
But not sure how this work if typing like this
import 'fabric-webpack'
You need to use import { fabric } from "fabric";
as shown here
The demo imports globally the library, that attaches the interface to window
, window.fabric
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.