I am new to SPFx and I am getting an error while trying to add jQuery and external JS in SPFX.
Example my web-part name is FlipBookWebPart
and I am trying to add turn.js
and modernizr.js
into the FlipBookWebPart.ts
.
I have declared the modernizr
in config.json like:
And below is an error that I received when add the web-part in local-workbench.
In the webpart.ts
, I add jQuery
and modernizr
using following code
import * as jQuery from "jquery";
import "jqueryui";
require('modernizr');