Search code examples
ruby-on-railsselectize.jsimport-maps

Rails: Pin selectize from cdnjs?


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?


Solution

  • You can try to write like below to terminal.

    ./bin/importmap pin selectize --from jsdelivr