Rails: Pin selectize from cdnjs?

288 Views Asked by At

Am trying to pin the selectize script (https://selectize.dev) for my rails 7 app (select2 simply seems too complicated), according to their webpage, they are on cdnjs. But when I issue the following command:

bin/importmap pin selectize --from=cdnjs

I get:

Couldn't find any packages in ["selectize"] on cdnjs

How do I make cdnjs "known" to importmap?

1

There are 1 best solutions below

1
On BEST ANSWER

You can try to write like below to terminal.

./bin/importmap pin selectize --from jsdelivr