I'm trying to use Alpine with 11ty.
This page renders, and I've verified window.Alpine exists on the page, but the @click isn't firing the alert function:
<html lang="en">
<head>
src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js"
defer
></script>
</head>
<body>
<button type="button" @click="alert('clicked')">click me</button>
</body>
</html>
I thought 11ty might be messing with the DOM, but the @click hasn't been tampered with:

Any ideas?
Looks like you're missing the x-data attribute, you can add it to the button directly or wrap the button in a div / other element :)
Welp that's embarrassing. I definitely missed that in the docs. Thanks!
Most helpful comment
Welp that's embarrassing. I definitely missed that in the docs. Thanks!