(Translated by https://www.hiragana.jp/)
Use correct import path in importmaps instructions · josefarias/hotwire_combobox@5367ff5 · GitHub
Skip to content

Commit

Permalink
Use correct import path in importmaps instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
josefarias committed Oct 13, 2024
1 parent 57dea45 commit 5367ff5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,18 @@ import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
lazyLoadControllersFrom("controllers", application)
```

Alternatively, modify `app/javascript/controllers/application.js` as suggested in the [JS bundling](#js-bundling-esbuild-rollup-etc) section below.
Alternatively, modify `app/javascript/controllers/application.js` as follows:

```js
import { Application } from "@hotwired/stimulus"
const application = Application.start()

// Add the following two lines:
import HwComboboxController from "controllers/hw_combobox_controller"
application.register("hw-combobox", HwComboboxController)

export { application }
```

#### JS bundling (esbuild, rollup, etc)

Expand Down

0 comments on commit 5367ff5

Please sign in to comment.