Installation

npm:

 

npm i easy-controllers

 

jsDelivr:

 

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easy-controllers@latest/dist/easy.min.css">
<script src="https://cdn.jsdelivr.net/npm/easy-controllers@latest/dist/easy.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/easy-controllers@latest/dist/easy-bootstrap.js"></script>

 

Make sure to have Hotwire Stimulus installed and exported:

 

<script type="importmap">
  {
    "imports": {
      "@hotwired/stimulus": "path/to/stimulus.js"
    }
  }
</script>

 

If the import identifier differs from @hotwired/stimulus, you can adjust it in easy-bootstrap.js:

 

// easy-bootstrap.js
// Change this line to match your setup:
#1 import { Application, Controller } from 'yourStimulusIdentifier';
#2 ...