Quokka.js(Wallaby.js) is unable to find jquery: $ is not defined

1.2k Views Asked by At

I have a small js project which runs without an issue. I wanted to try out Quokka.js(Wallaby.js) and see how it goes.

When I have enabled Quokka in vscode, it showed an error for $ is not defined for

$.ajaxSetup({ async: true, type: "GET" });

Is there a way to tell Quokka.js where to find jQuery?

My server config:

I am using nginx as the back end for my server and I initialize jQuery and script js in html file with

<script type="text/javascript" charset="utf8" src="./scripts/jquery-3.2.1.min.js"></script>
<script type="text/javascript" charset="utf8" src="./scripts/script.js"></script>

Quokka.js file configured by default to:

{"pro":false}

Quokka.js Console Output

Quokka #1 (node: v6.10.3)​​​​
​​​​
​​$ is not defined​​
  at scripts/quokka.js:184:0​

Editor and OS:

Visual Studio Code v1.14.0

CentOS Linux 7 (Core)

Quokka.js page: https://quokkajs.com/

0

There are 0 best solutions below