Skip to content

Allow customizing the island directory with islandDir without specifying ISLAND_FILES #344

@y-okady

Description

@y-okady

What is the feature you are proposing?

When placing island component files under /app/islands, the following configuration works as expected:

honox({ islandComponents: { islandDir: "/app/islands" } })

However, the following configuration does not work when placing them under /app/xxx:

honox({ islandComponents: { islandDir: "/app/xxx" } })

I found a workaround by specifying the ISLAND_FILES option in createClient() as shown below, but ideally I would like to change the island directory and load files as island components without using this optionjust by configuring the Vite plugin.

createClient({
  ISLAND_FILES: { ...import.meta.glob("/app/xxx/*.tsx") },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions