nodejs如何引入jquery
const jsdom = require('jsdom');const { JSDOM } = jsdom;
const { document } = (new JSDOM('<!doctype html><html><body></body></html>')).window;
global.document = document;
global.window = document.defaultView;
const $ = require('jquery')(window);
文档来源:51CTO技术博客https://blog.51cto.com/u_15315190/3202264
页:
[1]