如何在 Svelte/Sapper 应用程序中包含 JQuery? [英] How to Include JQuery in a Svelte/Sapper Application?

查看:45
本文介绍了如何在 Svelte/Sapper 应用程序中包含 JQuery?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有许多组件仍然需要我需要使用的 JQuery(不幸的是).

There are many components that still require JQuery that I need to use (unfortunately).

在 Svelte/Sapper 中执行此操作的最佳方法是什么?我应该使用 ES6 导入,修改汇总,还是最好的方法?

What is the best way to do this in Svelte/Sapper? Should I use ES6 Imports, modify rollup, or what is the best approach?

例如,我需要包含来自 DevExpress 或 Kendo UI 的数据透视表、网格、调度程序等.

For example, I need to include a pivot table, grid, scheduler, etc from DevExpress or Kendo UI.

我可以在 template.html 文件中全局引入 JQuery 并使其工作,但我确定这不是最好的方法.

I can pull in JQuery globally in the template.html file and get things to work, but I'm sure this is not the best way.

推荐答案

将其作为

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆