Insert jquery on web starter kit

2019-08-12 06:04发布

问题:

I want to add jquery for product dependency. I have already install gulp jquery via npm command. How to insert script in my index html file?

But when I have run command gulp serve:dist it's not showing on scripts folder or even in my project files.

回答1:

gulp-jquery is not meant to install jQuery to your project dependencies, but meant to build a subset of jQuery which you can use for your build. How this can be achieved is in the docs of this plugin.

With the web starter kit, you can't just wire up dependencies to your project, you would have to add the manually.

Best way to install jQuery: Either via npm (npm install --save jquery) or bower (bower install --save jquery).