Fluidbox
Fluidbox copied to clipboard
Npm + browserify (can't find variable jQuery)
It seems like your plungin isn't browserify compatible. I'm installing using the latest version of npm and browserify, but it seems like your plugin is depending on jQuery being included separately in the head.
I have no experience working with Browserify. Could you recommend how this can be rectified?
I had the same issue here. You could use browserify-shim meanwhile. Works fine.
@gwendoux i was trying it with browserify-shim but I am still getting the jQuery missing error. Can you tell me how you solved it? I am not so familiar with browserify-shim, here is my code of package.json
"browserify-shim": {
"fluidbox": {
"depends": [
"jquery:jQuery"
]
}
}
@mmintel Do you include jquery in your package.json ? When you open the result of your browserify operation, jquery is it included ?
@gwendoux yes jquery is included in my dependencies, it also works with browserify.
"dependencies": {
"fluidbox": "^2.0.0",
"jquery": "^3.1.0"
},
"browserify-shim": {
"fluidbox": {
"depends": [
"jquery:jQuery"
]
}
}