mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-17 19:26:48 +00:00
Using the helper `definitionsFromContext` generate quite long name for stimulus controller in component, ie : `tag-list-input-component--tag-list-input`. This custom loader will generate much more readable name, ie L `tag-list-input`. It's expecting the following pattern : ofn_component/ofn_controller.js and will fall back to the default of replacing "_" by "- and "/" by "--" for controller not matching the pattern.
6 lines
214 B
JavaScript
6 lines
214 B
JavaScript
// This controller will be called "example", ie "js-file-name" minus the "_controller.js"
|
|
// see controller/index.js for more info
|
|
import { Controller } from "stimulus";
|
|
|
|
export default class extends Controller {}
|