Skip to content

adopt stimulus controller template for Stimulus 3 #1089

@lxxxvi

Description

@lxxxvi

Hello 👋

Feature request

Stimulus moved their npm package from stimulus to @hotwired/stimulus. Subsequently the import for a Controller changes as well from

import { Controller } from "stimulus";

to

import { Controller } from "@hotwired/stimulus";

It would be nice if the component generator could detect the required module and use that in the stimulus controller template.

https://github.com/github/view_component/blob/f348d394c2ede1dff79c143bb11db6369dde3e1e/lib/rails/generators/stimulus/templates/component_controller.js.tt#L1:L7

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