Reputation: 4232
I was wondering if :
I was looking at the source on github and it seems like there is a require/almond.js version available. Can the same version be used with browserify without any changes?
I'm slightly confused as to what exactly am I required to do if I want to use jquery-select2 plugin with my project that uses npm and browserify?
Thanks in advance.
Upvotes: 2
Views: 1327
Reputation: 1027
As of today, you can simply load the latest version of Select2 at https://www.npmjs.com/package/select2.
Just install it by using npm install select2
Upvotes: 2
Reputation: 1604
There seems to be an issue in select2-4.0.0 when used in node/browserify environment. Until this issue is resolved you can depend on the issue creator's fork where it seems solved by pulling in {"select2": "leftmostcat/select2"}
(instead of select2/select2
) as dependency from within your package.json
.
Upvotes: 2
Reputation: 3149
I had that problem too. I solved that by adding the plugin with a script-tag to the page.
There ist no npm module for that plugin. There is only ember-select-2, a wrapper for jQuery select 2, but i don't know, if it ist the same. Just try it. But my above solution schuld work anyway.
Upvotes: 0