As soon as I add import draw2d from "draw2d"
to my imports I get ReferenceError: jQuery is not defined
.
I tried installing and adding jquery but still get same error...
import React, {Component} from "react";
import jQuery from "jquery";
import draw2d from "draw2d";
Create a file with any name, e.g. import-jquery.js
import jquery from "jquery";
window.$ = window.jQuery = jquery;
import "import-jquery";
import "jquery-ui-bundle"; // you also need this
import "jquery-ui-bundle/jquery-ui.css";
import draw2d from "draw2d";
EDIT:
And don't forget to...
npm install jquery
npm install jquery-ui-bundle