prepack icon indicating copy to clipboard operation
prepack copied to clipboard

Support for jquery

Open akbarexclusive opened this issue 5 years ago • 1 comments

ReferenceError: $ is not defined at script.js:84:1 (https://github.com/facebook/prepack/wiki/PP0023)

akbarexclusive avatar Mar 13 '19 06:03 akbarexclusive

You should inject $ as global object into js files. Prepack doesn't now anything about such variables... Webpack contains webpack.ProvidePlugin for such cases or use const $ = require('jquery') . It's not prepack issue at all because prepack is NodeJs package and works under NodeJs. You should pay attention on this. It's not "browser-package" but NodeJS...

Yegorich555 avatar Jan 02 '20 16:01 Yegorich555