I'm using Gulp and Browserify for my build process, except I'm having trouble using third party jQuery plugins – showing error jQuery is not defined
The following is my file structure.
app.js
import $ from 'jquery'
import plugin from 'jquery-plugin'
jquery-plugin.js
(function($) {
// Plugin code here
}(jQuery));
Any ideas?
Maybe you need use './'
import $ from 'jquery' import plugin from './jquery-plugin'
EDITED, my new answer below:
Try this way:
import * as jqueryPlugin from 'jquery-plugin'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.