[英]Only include certain components of JQuery into webpack
In jQuery UI for example, I found a working solution 例如,在jQuery UI中,我找到了一个可行的解决方案
npm install jquery-ui
and the use the components like this 并使用这样的组件
/* JQueryUI Draggable */
require('jquery-ui/ui/widgets/draggable.js');
Is there a similar system that actually works for jQuery itself? 是否有类似的系统实际上可用于jQuery本身?
a Typescript solution would be fine too. Typescript解决方案也可以。
Yes! 是! jQuery is available on npm: https://www.npmjs.com/package/jquery
jQuery在npm上可用: https ://www.npmjs.com/package/jquery
As well as Typescript: https://www.npmjs.com/package/typescript 以及打字稿: https ://www.npmjs.com/package/typescript
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.