【发布时间】:2020-11-04 23:06:03
【问题描述】:
在我的项目中,我使用 vuejs 而不是 jquery。测试 jquery 时,webpack encore 返回错误。下面是输出代码和错误的示例js。
我的 js:
if (typeof jQuery! == "undefined" && typeof jQuery.fn! == "undefined") {
console.log ("jquery is in the project");
} From others {
console.log ("jquery is not in the project");
}
输出错误:
未找到此依赖项:
jquery
我并没有真正使用jquery,所以我的console.log应该生成“jquery不在项目中”
还有另一种测试jquery的方法吗?
【问题讨论】:
标签: jquery laravel webpack laravel-mix