I tried use stimulus js without some build system and put it in my test.html file:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="https://unpkg.com/stimulus/dist/stimulus.umd.js"></script>
<script>
(() => {
const application = Stimulus.Application.start()
application.register("hello", class extends Stimulus.Controller {
static get targets() {
return [ "name" ]
}
// …
})
})()
</script>
<head>
<body>
<div data-controller="hello">
<input data-target="hello.name" type="text">
…
</div>
</body>
</html>
Nothing happened, nor an console error.
And i get this code here:
https://stimulusjs.org/handbook/installing#using-without-a-build-system