Skip to content

Suggestion: interactive pages by default #327

@dagnelies

Description

@dagnelies

Imagine the following: you spend hours, days, weeks developing an app and it works wonderfully in dev mode. After a lot of sweat and effort, you finally "build" it and ...nothing works at all. You then realize that dev mode (interactive by default) and the build (static by default) behave totally differently. That's not "joyful" but rather "frustrating", even more so because there is no quick fix to produce the same you had in dev.

This already popped up in the past in a couple of issues. Nevertheless, I think the need for interactive pages is underestimated. Perhaps it's just a simple login dialog or a complex page with dynamic language selection. The only workaround currently available is to put the complete "page" in a "component", which kind of misuses the otherwise intuitive file structure.

By default, everything is pre-rendered. Now that's fine for all those static pages, but if a page has a <script> part, it's highly likely because it is somewhat interactive. It's both counter-intuitive to drop scripts during build (but not dev) and problematic because there is no straightforward way to achieve it. That's why I'd humbly suggest having pages with a script tag be interactive by default, behaving like client:load, or at least have an iles option to do so. I think this would be more intuitive, versatile and solve all the above-mentioned problems.

That said, thanks for the framework. It's a nice lightweight alternative to nuxt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions