chrome-extension-typescript-starter icon indicating copy to clipboard operation
chrome-extension-typescript-starter copied to clipboard

ReferenceError: $ is not defined in content_script.js

Open maximelafarie opened this issue 5 years ago • 1 comments

While running code in content_script.js file, I get the following error in page where the extension runs : ReferenceError: $ is not defined.

I didn't changed anything in the default package.json file, and the manifest file look like this:

 "content_scripts": [
      {
          "matches": ["*://*.domain.com/*"],
          "js": ["js/vendor.js", "js/content_script.js"]
      }
  ],

Please note that the extension is running in dev watch mode.

Cheers! 🖖

maximelafarie avatar Aug 22 '19 14:08 maximelafarie

did you have import * as $ from 'jquery' in the ts file where you use jquery?

wunaidage avatar Oct 06 '19 03:10 wunaidage