Skip to content

using tailwindcss + nextjs and alpinejs #1539

@mrzslr

Description

@mrzslr

👋 Hey folks, I've been trying to use NextJS with Tailwindcss and AlpineJS together.
In Tailwind Heros examples, first example actually, shows that alpine imported via script tag but when wanna use NextJs and import even with turning off the SSR but still got Unexpected token which indicate @click="open = true" line. I get confused why It's not worked.

The way I use to turn off SSR in NextJS and import AplineJS :
export default dynamic(() => import('alpinejs')&& (Promise.resolve(IndexPage)),{ ssr: false })

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions